Skip to content

Commit

Permalink
Added support for extra args to start-stop-daemon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Petersen committed May 16, 2014
1 parent 4ee63a3 commit 68aed65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions init/ser2sock
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ SCRIPT_NAME=${0##*/}
CONF_FILE="/etc/ser2sock/${SCRIPT_NAME}.conf"
EXECUTABLE="/usr/local/bin/${PROGRAM_NAME}"
PID_FILE="/var/run/${SCRIPT_NAME}.pid"

#EXTRA_START_ARGS="--chuid pi:pi"
EXTRA_START_ARGS=""
DAEMON_ARGS="-d -f ${CONF_FILE} -P ${PID_FILE}"
RETVAL=0


BOLD=$(tput bold)
GREEN=$(tput setaf 2)
RED=$(tput setaf 1)
Expand All @@ -56,7 +58,7 @@ start() {
echo "PID file : $PID_FILE"
echo

start-stop-daemon --start --pidfile $PID_FILE --exec $EXECUTABLE -- \
start-stop-daemon --start $EXTRA_START_ARGS --pidfile $PID_FILE --exec $EXECUTABLE -- \
$DAEMON_ARGS >/dev/null 2>&1
RETVAL=$?

Expand Down

0 comments on commit 68aed65

Please sign in to comment.