summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2020-02-25 11:56:55 +0100
committerSimon Rettberg2020-02-25 11:56:55 +0100
commit115ccd4f08e9971d22012e1f537d1e4976e4745e (patch)
tree83614ab13d06097297e937e540c53108a501ac31 /satellit_upgrader
parent[SSUS] Remove stage4 patch chmod/chown (diff)
downloadsetup-scripts-115ccd4f08e9971d22012e1f537d1e4976e4745e.tar.gz
setup-scripts-115ccd4f08e9971d22012e1f537d1e4976e4745e.tar.xz
setup-scripts-115ccd4f08e9971d22012e1f537d1e4976e4745e.zip
[SSUS] Move chmod/own on taskmanager config so it will be effective
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 3783f39..399c61b 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -302,8 +302,6 @@ mkdir -m 0750 -p "$PATH_TASKMANAGER/config"
diffcp "taskmanager/config" "$PATH_TASKMANAGER/config/config" && tm_restart=1
diffcp "taskmanager/environment" "$PATH_TASKMANAGER/config/environment" && tm_restart=4
diffcp "taskmanager/taskmanager.service" "/etc/systemd/system/taskmanager.service" && tm_restart=111
-chmod 0640 "$PATH_TASKMANAGER/config/config"
-chown -R root:taskmanager "$PATH_TASKMANAGER/config"
# java app
if [ -n "$TGZ_TASKMANAGER" ]; then
[ -e "$TMPDIR/$TGZ_TASKMANAGER" ] || perror "$TGZ_TASKMANAGER missing from payload"
@@ -321,6 +319,9 @@ if [ -n "$TGZ_TASKMANAGER" ]; then
tm_restart=1
echo "Taskmanager upgrade complete"
fi
+# Protect config with password in it
+chmod 0640 "$PATH_TASKMANAGER/config/config"
+chown -R root:taskmanager "$PATH_TASKMANAGER/config"
# sudo config
if diffcp "tm-sudo-config" "/etc/sudoers.d/taskmanager" "Installing new sudo config for taskmanager"; then
chmod 0440 "/etc/sudoers.d/taskmanager"