index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Dylan M. Taylor <dylan@dylanmtaylor.com> | 2021-04-29 08:08:15 -0400 |
---|---|---|
committer | Dylan Taylor <dylan@dylanmtaylor.com> | 2021-04-29 10:22:33 -0400 |
commit | 3c5dd7b335f0618046bacc03900a4b8b354309cd (patch) | |
tree | 3a116575063526c970773aa671bd853f54ef1b80 /profiles/server.py | |
parent | fb56fa3c5f3b76773d5c6a00a97f4dfdda5cc573 (diff) |
-rw-r--r-- | profiles/server.py | 30 |
diff --git a/profiles/server.py b/profiles/server.py new file mode 100644 index 00000000..fcb33ee8 --- /dev/null +++ b/profiles/server.py @@ -0,0 +1,30 @@ +# Used to select various server application profiles on top of a minimal installation. + +import archinstall, os, logging + +is_top_level_profile = True + +available_servers = ["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, f"Choose which servers to install and enable (leave blank for a minimal installation): ") + archinstall.storage['_selected_servers'] = selected_servers + + return True # Do nothing and just return True + +if __name__ == 'server': + """ + This "profile" is a meta-profile. + """ + archinstall.log(f'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(installation, 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) |