diff --git a/debian/scripts/tarantool_instance b/debian/scripts/tarantool_instance index e97f9c6ad6c90b63d71d74585b90e6539843b543..0923db3b446d8b224b49274e8620fd4ab437eafa 100755 --- a/debian/scripts/tarantool_instance +++ b/debian/scripts/tarantool_instance @@ -16,6 +16,10 @@ cd $CFG_DIR usage="Usage: sh $0 /path/to/config.file start|stop" +if ! test -x $BOX; then + exit 0 +fi + if test -z "$CFG"; then echo $usage exit 5 @@ -57,8 +61,11 @@ LOGGER="exec /usr/lib/tarantool/logger $LOG" SOCKETS=`grep \ '^[[:space:]]*file_descriptors[[:space:]]*=[[:space:]]*[[:digit:]]\+' $CFG \ | tail -n 1 \ - | sed 's/[^[:digit:]]//g' -` + | sed 's/[^[:digit:]]//g'` + +if ! test -x $PID_DIR; then + install -otarantool -gtarantool -d -m0750 $PID_DIR +fi SSDARGS_NO_PID="--quiet --chdir $RUNDIR --chuid tarantool --exec" SSDARGS="--pidfile $PID $SSDARGS_NO_PID"