From 27ac518f2e5e6adce1b7cdfe8593458bcf1e47d9 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 5 May 2022 09:43:43 -0400 Subject: [PATCH] Build: Set umask before writing temporary systemd unit file --- build_scripts/appimage/install-infection-monkey-service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_scripts/appimage/install-infection-monkey-service.sh b/build_scripts/appimage/install-infection-monkey-service.sh index 8baffc735..aa434318b 100755 --- a/build_scripts/appimage/install-infection-monkey-service.sh +++ b/build_scripts/appimage/install-infection-monkey-service.sh @@ -25,6 +25,7 @@ echo_help() { install_service() { move_appimage + umask 077 cat > "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" << EOF [Unit] @@ -40,7 +41,6 @@ ExecStart="${MONKEY_BIN}/${APPIMAGE_NAME}" WantedBy=multi-user.target EOF - umask 077 sudo mv "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" "${SYSTEMD_DIR}/${SYSTEMD_UNIT_FILENAME}" sudo systemctl enable "${SYSTEMD_UNIT_FILENAME}" &>/dev/null