summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/50-install_taskmanager.inc
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-17 15:08:14 +0100
committerSimon Rettberg2020-12-17 15:08:14 +0100
commitb5c3eb9e01b09367935f558a57633b68a65a1a21 (patch)
treeb6c322f3089192124779b9d7a29c8365eb39533f /satellit_installer/includes/50-install_taskmanager.inc
parent[SSPS] slx-cert: Put hostname in SAN too, chromium requires this (diff)
downloadsetup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.tar.gz
setup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.tar.xz
setup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.zip
[SSPS] Refactor static_files: Submodules with tree
Add submodules (aka directories) to static_files, named according to what component they are for. Add function "install_files" to copy the contents of one of those modules to the root directory. This should make the resulting setup more obvious and require less manual copying of files everywhere.
Diffstat (limited to 'satellit_installer/includes/50-install_taskmanager.inc')
-rw-r--r--satellit_installer/includes/50-install_taskmanager.inc18
1 files changed, 8 insertions, 10 deletions
diff --git a/satellit_installer/includes/50-install_taskmanager.inc b/satellit_installer/includes/50-install_taskmanager.inc
index b02cb6b..0c6b70c 100644
--- a/satellit_installer/includes/50-install_taskmanager.inc
+++ b/satellit_installer/includes/50-install_taskmanager.inc
@@ -3,14 +3,12 @@ install_taskmanager() {
echo "# Installing taskmanager... "
mkdir -p "$1"
unpack_tar_gz "$BASEDIR/static_files/taskmanager.tar.gz" "-C $1"
- chown -R root:root "$1"
- 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"
- mkdir -m 0750 -p "$TASKMANDIR/config"
- chown root:taskmanager "$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"
+ chown -R root:root "$1" || perror "chown $1 failed"
+ install_files "taskmanager"
+ chown -R root:taskmanager "$TASKMANDIR/config"
+ chmod 0750 "$TASKMANDIR/config"
+ chmod 0640 \
+ "$TASKMANDIR/config/config" \
+ "$TASKMANDIR/config/environment" \
+ || perror "chmod of taskmanager config failed"
}