summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/includes/50-install_taskmanager.inc6
-rw-r--r--satellit_installer/static_files/rclocal_script.sh8
-rw-r--r--satellit_installer/static_files/slxadmin-config.php2
-rw-r--r--satellit_installer/static_files/taskmanager/config2
-rw-r--r--satellit_installer/static_files/taskmanager/environment2
5 files changed, 17 insertions, 3 deletions
diff --git a/satellit_installer/includes/50-install_taskmanager.inc b/satellit_installer/includes/50-install_taskmanager.inc
index 6cf9541..c503d56 100644
--- a/satellit_installer/includes/50-install_taskmanager.inc
+++ b/satellit_installer/includes/50-install_taskmanager.inc
@@ -7,5 +7,9 @@ install_taskmanager() {
install -o root "$BASEDIR/static_files/taskmanager/taskmanager.service" "/etc/systemd/system/taskmanager.service" || perror "Could not install systemd service"
systemctl daemon-reload
systemctl enable taskmanager.service || perror "Could not enable taskmanager.service"
- echo "ok"
+ mkdir -m 0750 -p "$TASKMANDIR/config"
+ install -o root -g taskmanager -m 0640 \
+ "$BASEDIR/static_files/taskmanager/config" \
+ "$BASEDIR/static_files/taskmanager/environment" \
+ "$TASKMANDIR/config/" || perror "Could not install taskmanager config"
}
diff --git a/satellit_installer/static_files/rclocal_script.sh b/satellit_installer/static_files/rclocal_script.sh
index 7803aa1..07da0ee 100644
--- a/satellit_installer/static_files/rclocal_script.sh
+++ b/satellit_installer/static_files/rclocal_script.sh
@@ -67,11 +67,15 @@ echo -n "Konfigurationsdateien werden aktualisiert..." >> /root/init.log
# sat mysql pass
# Patch dmsd
-patchfiles "%MYSQL_SAT_PASS%" "$MYSQL_SAT_NEW" "$DMSDDIR/config.properties"
+patchfiles "%MYSQL_SAT_PASS%" "$MYSQL_SAT_NEW" "$DMSDDIR/config.properties"
# openslx mysql pass
# Patching openslx-mysql-userpass into slx-admin config:
-patchfiles "%MYSQL_OPENSLX_PASS%" "$MYSQL_OPENSLX_NEW" "$WWWDIR/slx-admin/config.php"
+patchfiles "%MYSQL_OPENSLX_PASS%" "$MYSQL_OPENSLX_NEW" "$WWWDIR/slx-admin/config.php"
+
+# taskmanager password
+TASKMANAGER_PASS=$(generate_password)
+patchfile "%TM_OPENSLX_PASS%" "$TASKMANAGER_PASS" "$WWWDIR/slx-admin/config.php" "$TASKMANDIR/config/config"
echo " ok." >> /root/init.log
diff --git a/satellit_installer/static_files/slxadmin-config.php b/satellit_installer/static_files/slxadmin-config.php
index 1ae4322..39da9e5 100644
--- a/satellit_installer/static_files/slxadmin-config.php
+++ b/satellit_installer/static_files/slxadmin-config.php
@@ -13,6 +13,8 @@ define('CONFIG_SQL_PASS', '%MYSQL_OPENSLX_PASS%');
// Set this to true if you mysql server doesn't default to UTF-8 on new connections
define('CONFIG_SQL_FORCE_UTF8', false);
+define('CONFIG_TM_PASSWORD', '%TM_OPENSLX_PASS%');
+
define('CONFIG_TGZ_LIST_DIR', '/opt/openslx/configs');
define('CONFIG_REMOTE_ML', 'https://bwlp-masterserver.ruf.uni-freiburg.de/minilinux/sat_06');
diff --git a/satellit_installer/static_files/taskmanager/config b/satellit_installer/static_files/taskmanager/config
new file mode 100644
index 0000000..055dd13
--- /dev/null
+++ b/satellit_installer/static_files/taskmanager/config
@@ -0,0 +1,2 @@
+tcp = 9215
+password = %TM_OPENSLX_PASS%
diff --git a/satellit_installer/static_files/taskmanager/environment b/satellit_installer/static_files/taskmanager/environment
new file mode 100644
index 0000000..ee371cd
--- /dev/null
+++ b/satellit_installer/static_files/taskmanager/environment
@@ -0,0 +1,2 @@
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+LANG=C