index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2024-05-10 15:56:28 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2024-05-10 15:56:28 +0200 |
commit | 683da22298abbd90f51d4dd38a7ec4b0dfb04555 (patch) | |
tree | ec2ac04967f9277df038edc362201937b331abe5 /profiles/server.py | |
parent | af7ab9833c9f9944874f0162ae0975175ddc628d (diff) | |
parent | 3381cd55673e5105697d354cf4a1be9a7bcef062 (diff) |
-rw-r--r-- | profiles/server.py | 63 |
diff --git a/profiles/server.py b/profiles/server.py deleted file mode 100644 index f3e32d26..00000000 --- a/profiles/server.py +++ /dev/null @@ -1,63 +0,0 @@ -# Used to select various server application profiles on top of a minimal installation. - -import logging -from typing import Any, TYPE_CHECKING - -import archinstall -from archinstall import Menu -from archinstall.lib.menu.menu import MenuSelectionType - -if TYPE_CHECKING: - _: Any - -is_top_level_profile = True - -__description__ = str(_('Provides a selection of various server packages to install and enable, e.g. httpd, nginx, mariadb')) - -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. - """ - choice = Menu(str(_( - 'Choose which servers to install, if none then a minimal installation will be done')), - available_servers, - preset_values=kwargs['servers'], - multi=True - ).run() - - if choice.type_ != MenuSelectionType.Selection: - return False - - if choice.value: - archinstall.storage['_selected_servers'] = choice.value - return True - - return False - - -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) |