mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
simplified way to manage system services
This commit is contained in:
parent
96019af673
commit
c81a2bf123
4 changed files with 12 additions and 47 deletions
|
@ -27,16 +27,9 @@ check_args '1' "$#" 'SERVICE'
|
|||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
if [ -x "/etc/init.d/$service" ]; then
|
||||
/etc/init.d/$service start >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
fi
|
||||
else
|
||||
service $service start >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
fi
|
||||
service $service start >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue