Merge pull request #3804 from KoeSystems/init-script-improvements
init.d script -- fix issue #3803pull/3829/head
commit
83577baa93
|
@ -45,7 +45,7 @@ PIDFILE=/var/run/influxdb/influxd.pid
|
||||||
PIDDIR=`dirname $PIDFILE`
|
PIDDIR=`dirname $PIDFILE`
|
||||||
if [ ! -d "$PIDDIR" ]; then
|
if [ ! -d "$PIDDIR" ]; then
|
||||||
mkdir -p $PIDDIR
|
mkdir -p $PIDDIR
|
||||||
chown $GROUP:$USER $PIDDIR
|
chown $USER:$GROUP $PIDDIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Max open files
|
# Max open files
|
||||||
|
@ -151,7 +151,7 @@ case $1 in
|
||||||
if which start-stop-daemon > /dev/null 2>&1; then
|
if which start-stop-daemon > /dev/null 2>&1; then
|
||||||
start-stop-daemon --chuid $GROUP:$USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &
|
start-stop-daemon --chuid $GROUP:$USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &
|
||||||
else
|
else
|
||||||
nohup $DAEMON -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &
|
su -c "nohup $DAEMON -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &" $USER
|
||||||
fi
|
fi
|
||||||
log_success_msg "$NAME process was started"
|
log_success_msg "$NAME process was started"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue