Skip to content

Commit

Permalink
reload systemd if service exists already
Browse files Browse the repository at this point in the history
  • Loading branch information
bitSheriff committed Sep 26, 2023
1 parent 5a4eba7 commit 845f5d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autostart_shelfslide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ fi
# Check if the script is executed with root privileges
if [ "$EUID" -ne 0 ]; then
echo "This script requires root privileges. Please run it as root."

# just reload systemd
systemctl daemon-reload

# Enable and start the service
systemctl enable ${SERVICE_NAME}.service
systemctl start ${SERVICE_NAME}.service
exit 1
fi

Expand Down

0 comments on commit 845f5d2

Please sign in to comment.