Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-29 18:38:28 +0000
committerGitHub <noreply@github.com>2021-04-29 18:38:28 +0000
commitfb0ced900fa214ce1b1c4e86f4a91d17c2a4b028 (patch)
treef5f967f8ddcbb0e1bf80a5c996b2f21f93f8d4bf
parenta739326be471d1fc8738d3f229e45d7b4f93f0cf (diff)
parentaf3d85dc7d2ff86531766b9b819009e0c1a659c1 (diff)
Merge pull request #391 from dylanmtaylor/patch-1
Implement server top-level profile
-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)