mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
upstart service handler
This commit is contained in:
parent
0072c8189a
commit
1287a1e0d5
3 changed files with 15 additions and 0 deletions
|
@ -41,6 +41,11 @@ if [ -x "/etc/init.d/$service" ]; then
|
||||||
rm -f $tmpfile
|
rm -f $tmpfile
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
service $service restart >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,11 @@ if [ -x "/etc/init.d/$service" ]; then
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
service $service start >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,11 @@ if [ -x "/etc/init.d/$service" ]; then
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
service $service stop >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue