upstart service handler

This commit is contained in:
Serghey Rodin 2014-05-16 12:06:16 +03:00
parent 0072c8189a
commit 1287a1e0d5
3 changed files with 15 additions and 0 deletions

View file

@ -41,6 +41,11 @@ if [ -x "/etc/init.d/$service" ]; then
rm -f $tmpfile
exit $E_RESTART
fi
else
service $service restart >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
fi

View file

@ -32,6 +32,11 @@ if [ -x "/etc/init.d/$service" ]; then
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
else
service $service start >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
fi

View file

@ -32,6 +32,11 @@ if [ -x "/etc/init.d/$service" ]; then
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
else
service $service stop >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
fi