added coredump file to debian init command

This commit is contained in:
Radu Ioan Fericean
2014-11-27 15:37:31 +02:00
parent 98d3bd6cde
commit d0fb4aab90
2 changed files with 4 additions and 28 deletions

View File

@@ -23,6 +23,7 @@ GROUP=cgrates
ENGINE_OPTS=""
RUNDIR=/var/run/$NAME
PIDFILE=$RUNDIR/cgr-engine.pid
COREDUMP=$RUNDIR/cgr-coredump.log
SCRIPTNAME=/etc/init.d/$NAME
DEFAULTS=/etc/default/$NAME
ENABLE=false
@@ -62,7 +63,8 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
echo "Started at:" `date`>>$COREDUMP
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null 2>>$COREDUMP \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --exec $DAEMON --chuid $USER:$GROUP --background -- \
$ENGINE_OPTS \