Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/server.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-05-12 14:45:04 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-05-12 14:45:04 +0200
commit12dc55650d78dc41bbc0ab7013baa7b3ce61ec7c (patch)
tree945dd48af6c32e03f10aa14186149e92f2a120a1 /profiles/server.py
parent1708f1850d5d620e7a44ab4da4a9c5c028f5008b (diff)
parentdf6c4e77f721da2b03a510548d281992b25987b2 (diff)
Merge branch 'master' of github.com:Torxed/archinstall into torxed-fix-350
Diffstat (limited to 'profiles/server.py')
-rw-r--r--profiles/server.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/profiles/server.py b/profiles/server.py
new file mode 100644
index 00000000..9d28054d
--- /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 = ["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, f"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(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)