remove sudo, use use instead

This commit is contained in:
Sispheor 2015-06-21 23:29:32 +02:00
parent 90510534f7
commit 6dc4a46e17

View File

@ -28,7 +28,7 @@ test -x $DAEMON || exit 5
case "$1" in
start)
log_daemon_msg "Starting" "$NAME"
sudo -u $steamcmd_user $DAEMON start
su -s /bin/sh -c "$DAEMON start" $steamcmd_user
PID=`ps -ef | grep $NAME | grep -v grep | awk '{print $2}'`
if [ -n "$PID" ]; then
log_end_msg 0
@ -39,7 +39,7 @@ case "$1" in
stop)
log_daemon_msg "Stopping" "$NAME"
sudo -u $steamcmd_user $DAEMON stop
su -s /bin/sh -c "$DAEMON stop" $steamcmd_user
PID=`ps -ef | grep $NAME | grep -v grep | awk '{print $2}'`
if [ -n "$PID" ]; then
log_end_msg 1
@ -49,11 +49,11 @@ case "$1" in
;;
restart)
sudo -u $steamcmd_user $DAEMON restart
su -s /bin/sh -c "$DAEMON restart" $steamcmd_user
;;
status)
sudo -u $steamcmd_user $DAEMON status
su -s /bin/sh -c "$DAEMON status" $steamcmd_user
;;
*)