index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-05-24 12:34:32 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-05-24 12:34:32 +0200 |
commit | 9b0de26c67b6bb90b69d5b4ef874dc0bed407a77 (patch) | |
tree | 69f1b5e0b6ad48018ce9e18d6d74079bfb123540 /profiles/server.py | |
parent | 404197dc93c2efb24097772848af708d833bdd98 (diff) | |
parent | 7daaf1143fca2723bfb63ab4e3030485446da1c0 (diff) |
-rw-r--r-- | profiles/server.py | 44 |
diff --git a/profiles/server.py b/profiles/server.py new file mode 100644 index 00000000..704c8efe --- /dev/null +++ b/profiles/server.py @@ -0,0 +1,44 @@ +# Used to select various server application profiles on top of a minimal installation. + +import logging + +import archinstall + +is_top_level_profile = True + +available_servers = [ + "cockpit", + "docker", + "httpd", + "lighttpd", + "mariadb", + "nginx", + "postgresql", + "sshd", + "tomcat", +] + + +def _prep_function(*args, **kwargs): + """ + Magic function called by the importing installer + before continuing any further. + """ + selected_servers = archinstall.generic_multi_select(available_servers, "Choose which servers to install and enable (leave blank for a minimal installation): ") + archinstall.storage['_selected_servers'] = selected_servers + + return True + + +if __name__ == 'server': + """ + This "profile" is a meta-profile. + """ + archinstall.log('Now installing the selected servers.', level=logging.INFO) + archinstall.log(archinstall.storage['_selected_servers'], level=logging.DEBUG) + for server in archinstall.storage['_selected_servers']: + archinstall.log(f'Installing {server} ...', level=logging.INFO) + app = archinstall.Application(archinstall.storage['installation_session'], server) + app.install() + + archinstall.log('If your selections included multiple servers with the same port, you may have to reconfigure them.', fg="yellow", level=logging.INFO) |