Skip to content

Commit

Permalink
Merge pull request #99 from IngmarStein/start-stop-status-take2
Browse files Browse the repository at this point in the history
Fix start-stop-status script (take 2)
  • Loading branch information
oznu authored Oct 14, 2022
2 parents fc09600 + cf0f51e commit e2d91d8
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions scripts/start-stop-status
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
#!/bin/bash
case "$1" in
start)
synosystemctl start pkgctl-homebridge
if [ "${EUID}" -eq 0 ]; then
sudo -u homebridge synosystemctl start pkguser-homebridge
else
synosystemctl start pkguser-homebridge
fi
;;
stop)
synosystemctl stop pkgctl-homebridge
if [ "${EUID}" -eq 0 ]; then
sudo -u homebridge synosystemctl stop pkguser-homebridge
else
synosystemctl stop pkguser-homebridge
fi
;;
status)
synosystemctl get-active-status pkgctl-homebridge
if [ "${EUID}" -eq 0 ]; then
sudo -u homebridge synosystemctl get-active-status pkguser-homebridge
else
synosystemctl get-active-status pkguser-homebridge
fi
;;
log)
echo ""
Expand All @@ -17,4 +29,3 @@ case "$1" in
exit 1
;;
esac
exit 0

0 comments on commit e2d91d8

Please sign in to comment.