Line 76:
Line 76:
PIDFILE=/var/run/$NAME.pid
PIDFILE=/var/run/$NAME.pid
−
LOGFILE=/var/log/$NAME.log
+
LOGFILE=/dev/null
start() {
start() {
Line 87:
Line 87:
su -s /bin/sh $RUNAS -c "$CMD" > "$PIDFILE"
su -s /bin/sh $RUNAS -c "$CMD" > "$PIDFILE"
−
# Try with this command line instead of above if not workable
+
sleep 5
−
# su -c "$CMD" $RUNAS > "$PIDFILE"
−
−
sleep 2
PID=$(cat $PIDFILE)
PID=$(cat $PIDFILE)
if pgrep -u $RUNAS -f $NAME > /dev/null
if pgrep -u $RUNAS -f $NAME > /dev/null