Skip to content
Snippets Groups Projects
Commit 31aeeaac authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

rpm-start-activecheck: check for the active tarantool instance

before starting another one.
parent 2e82d266
No related branches found
No related tags found
No related merge requests found
......@@ -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 ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment