summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/90-patch_slxadmin.inc
diff options
context:
space:
mode:
authorSimon Rettberg2023-10-19 13:22:27 +0200
committerSimon Rettberg2023-10-19 13:22:27 +0200
commitf3ce2e1cbf6368a0e3bd176c59f0d0ab7cadd6c7 (patch)
tree64e31708c54461caf65710578d3fd1dc037bf266 /satellit_installer/includes/90-patch_slxadmin.inc
parent[SSPS] issue: lightred for better readablity on black background (diff)
downloadsetup-scripts-f3ce2e1cbf6368a0e3bd176c59f0d0ab7cadd6c7.tar.gz
setup-scripts-f3ce2e1cbf6368a0e3bd176c59f0d0ab7cadd6c7.tar.xz
setup-scripts-f3ce2e1cbf6368a0e3bd176c59f0d0ab7cadd6c7.zip
[SSPS] Modernize; switch default user to openslx + sudo
Diffstat (limited to 'satellit_installer/includes/90-patch_slxadmin.inc')
-rw-r--r--satellit_installer/includes/90-patch_slxadmin.inc31
1 files changed, 0 insertions, 31 deletions
diff --git a/satellit_installer/includes/90-patch_slxadmin.inc b/satellit_installer/includes/90-patch_slxadmin.inc
deleted file mode 100644
index 69afbcb..0000000
--- a/satellit_installer/includes/90-patch_slxadmin.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-# Prepare files and symlinks in slx-admin www dir
-patch_slxadmin_dir () {
- # Create modules directory and link modules from modules-available according to slxadmin module list (SLXADMIN_MODULES):
- mkdir -p "$WWWDIR/slx-admin/modules"
- cd "$WWWDIR/slx-admin/modules" || perror "Cannot cd to slxadmin/modules"
- for MOD in ${SLXADMIN_MODULES}; do
- NAME="${MOD%%-*}"
- ln -s "../modules-available/$MOD" "$NAME" || perror "Could not activate module '$MOD' (alias '$NAME')"
- done
- cd - 1>/dev/null
-}
-
-# This needs to be called after mysql users have been created
-install_slxadmin_db () {
- # Prepare temporary config
- install_files "slxadmin"
- sed -i "s/%MYSQL_OPENSLX_PASS%/${MYSQL_OPENSLX_PASS}/" "$WWWDIR/slx-admin/config.php" || perror "Could not write temporary DB password to config.php"
- # Install slx-admin DB
- cd "$WWWDIR/slx-admin" || perror "Cannot cd to $WWWDIR"
- echo "# Installing slx-admin database"
- sudo -n -u www-data ./install-all || perror "Could not install slx-admin database"
- cd - 1>/dev/null
- # Fill database with data we need (run as root)
- /opt/openslx/restore.d/slxadmin-init/init.sh || perror "Filling tables with required data failed"
- # Reset with original template for firstboot script
- install_files "slxadmin"
- chmod 640 "$WWWDIR/slx-admin/config.php"
- chown root:www-data "$WWWDIR/slx-admin/config.php"
- # appending a variable with satellite server build date/time to slx-admin config:
- echo "define('CONFIG_FOOTER', 'Build time: $(date "+%Y-%m-%d %H:%m:%S"), $VERSION');" >> "$WWWDIR/slx-admin/config.php"
-}