try to fix def server_config_files in the infra script

This commit is contained in:
manuel 2024-07-15 12:15:34 +00:00
parent 854b2b5ca8
commit 92e0bdeec8
1 changed files with 26 additions and 17 deletions

View File

@ -622,8 +622,8 @@ def shared_server_files():
def server_config_files(sbase):
"""
This will copy all specific files that are used for the server builds,
adapted for the provided base (sbase).
This function copies specific files used for server builds
and configures them based on the provided base (sbase).
"""
base_config = {
"debian": {
@ -658,20 +658,20 @@ def server_config_files(sbase):
]
des_paths = [
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin',
'/usr/local/bin/welcome.sh',
'/usr/local/bin/configure_apache2.sh',
'/usr/local/bin/configure_firewalld.sh',
'/usr/local/bin/configure_hostname.sh',
'/usr/local/bin/configure_mariadb.sh',
'/usr/local/bin/configure_nginx.sh',
'/usr/local/bin/configure_php_and_docker.sh',
'/usr/local/bin/configure_postfix.sh',
'/usr/local/bin/configure_postgresql.sh',
'/usr/local/bin/configure_sqlite.sh',
'/usr/local/bin/configure_ssh.sh',
'/usr/local/bin/configure_static_ip.sh',
'/usr/local/bin/create_user.sh',
'/usr/local/bin/update_and_install.sh',
]
src_q = collections.deque(src_paths)
@ -681,7 +681,7 @@ def server_config_files(sbase):
src = src_q.popleft()
des = des_q.popleft()
src_path = os.path.join(HOME_FOLDER, src)
des_path = os.path.join(HOME_FOLDER, WPCHROOT, des)
des_path = os.path.join(HOME_FOLDER, des)
logger.info(f"Copying {src_path} to {des_path}")
try:
@ -691,6 +691,15 @@ def server_config_files(sbase):
else:
logger.info(f"Successfully copied {src_path} to {des_path}")
logger.info(f"Configuring server for {sbase.capitalize()}")
if sbase == "debian":
# Add Debian specific configuration logic here
pass
elif sbase == "devuan":
# Add Devuan specific configuration logic here
pass
def boostrap_shared():
"""
Copy specific folders in the boostrap location