diff --git a/extra/tarantool_box b/extra/tarantool_box old mode 100755 new mode 100644 index 3538a99ba62876fdcda6ebc65dacec0f33621885..ae855b504310969ade272925979ce9c727b4631b --- a/extra/tarantool_box +++ b/extra/tarantool_box @@ -32,8 +32,30 @@ then exit fi +checkactive() { + if [ -f ${WRAP_PIDFILE} ] + then + ps -p $(cat ${WRAP_PIDFILE}) >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo -n "(instance is active)" + echo_failure + exit 1 + fi + fi + if [ -f ${PIDFILE} ] + then + ps -p $(cat ${PIDFILE}) >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo -n "(instance is active)" + echo_failure + exit 1 + fi + fi +} + start() { echo -n $"Starting ${INST}: " + checkactive /usr/bin/${INST}.sh ${OPTIONS} >> /var/${INST}/logs/init.log 2>&1 RETVAL=${?} if [ ${RETVAL} -eq 0 ]