Modify init script so siahsd can run as non-root
This commit is contained in:
parent
c703e76e2a
commit
b678fb5535
1 changed files with 3 additions and 2 deletions
|
@ -17,11 +17,12 @@
|
|||
|
||||
DAEMON=/usr/local/src/siahsd/build/siahsd
|
||||
DAEMON_ARGS=
|
||||
USER=siahsd
|
||||
PIDFILE=/var/run/siahsd.pid
|
||||
|
||||
start() {
|
||||
echo -n "Starting SIA-HS Daemon: "
|
||||
if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS; then
|
||||
if start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON -- $DAEMON_ARGS; then
|
||||
echo "siahsd."
|
||||
else
|
||||
echo "FAILED."
|
||||
|
@ -31,7 +32,7 @@ start() {
|
|||
|
||||
stop() {
|
||||
echo -n "Stopping SIA-HS Daemon: "
|
||||
if start-stop-daemon --stop --quiet --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