Fix init script for pidfile access rights
This commit is contained in:
parent
a081fb8920
commit
fe6eb62b55
1 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,9 @@ PIDFILE=/var/run/siahsd.pid
|
|||
|
||||
start() {
|
||||
echo -n "Starting SIA-HS Daemon: "
|
||||
if start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON -- $DAEMON_ARGS; then
|
||||
touch "$PIDFILE"
|
||||
chown "$USER": "$PIDFILE"
|
||||
if start-stop-daemon --start --quiet --pidfile "$PIDFILE" --chuid "$USER" --exec "$DAEMON" -- $DAEMON_ARGS; then
|
||||
echo "siahsd."
|
||||
else
|
||||
echo "FAILED."
|
||||
|
@ -32,7 +34,7 @@ start() {
|
|||
|
||||
stop() {
|
||||
echo -n "Stopping SIA-HS Daemon: "
|
||||
if start-stop-daemon --stop --quiet --chuid $USER --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON; then
|
||||
if start-stop-daemon --stop --quiet --chuid "$USER" --retry=TERM/30/KILL/5 --pidfile "$PIDFILE" --exec "$DAEMON"; then
|
||||
echo "siahsd."
|
||||
else
|
||||
echo "FAILED."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue