Commit a0e12ec8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add enable/disable for on/off and make it main files

parent 95b5d707
......@@ -135,11 +135,11 @@ check_command()
stop) # HELPCMD: stop service
serv_cmd=stop
;;
on) # HELPCMD: add service to run on startup and start it now
serv_cmd=on
on|enable) # HELPCMD: add service to run on startup and start it now
serv_cmd=enable
;;
off) # HELPCMD: remove service to run on startup and stop it now
serv_cmd=off
off|disable) # HELPCMD: remove service to run on startup and stop it now
serv_cmd=disable
;;
*)
return 1
......
......@@ -22,7 +22,7 @@ load_helper serv-stop
load_helper serv-status
# Enable service by default
serv_off()
serv_disable()
{
is_service_running $1 && { serv_stop $1 || return ; }
is_service_autostart $1 || { echo "Service $1 already disabled for startup" && return ; }
......
......@@ -22,7 +22,7 @@ load_helper serv-start
load_helper serv-status
# Enable service by default
serv_on()
serv_enable()
{
is_service_running $1 || serv_start $1 || return
is_service_autostart $1 && echo "Service $1 already enabled for startup" && return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment