Build: Set umask before writing temporary systemd unit file

This commit is contained in:
Mike Salvatore 2022-05-05 09:43:43 -04:00
parent 02ba8361a9
commit 27ac518f2e
1 changed files with 1 additions and 1 deletions

View File

@ -25,6 +25,7 @@ echo_help() {
install_service() { install_service() {
move_appimage move_appimage
umask 077
cat > "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" << EOF cat > "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" << EOF
[Unit] [Unit]
@ -40,7 +41,6 @@ ExecStart="${MONKEY_BIN}/${APPIMAGE_NAME}"
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
umask 077
sudo mv "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" "${SYSTEMD_DIR}/${SYSTEMD_UNIT_FILENAME}" sudo mv "${SCRIPT_DIR}/${SYSTEMD_UNIT_FILENAME}" "${SYSTEMD_DIR}/${SYSTEMD_UNIT_FILENAME}"
sudo systemctl enable "${SYSTEMD_UNIT_FILENAME}" &>/dev/null sudo systemctl enable "${SYSTEMD_UNIT_FILENAME}" &>/dev/null