Commit 099cecf6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

serv: use named variable instead of $1 in messages

parent ec0dbb11
......@@ -25,7 +25,7 @@ serv_disable()
{
local SERVICE="$1"
is_service_autostart $1 || { info "Service $1 already disabled for startup" && return ; }
is_service_autostart $SERVICE || { info 'Service $SERVICE already disabled for startup' && return ; }
case $SERVICETYPE in
service-chkconfig|service-upstart)
......
......@@ -25,7 +25,7 @@ serv_enable()
{
local SERVICE="$1"
is_service_autostart $1 && info "Service $1 is already enabled for startup" && return
is_service_autostart $SERVICE && info 'Service $SERVICE is already enabled for startup' && return
case $SERVICETYPE in
service-chkconfig)
......
......@@ -26,7 +26,7 @@ serv_off()
{
local SERVICE="$1"
is_service_running $1 && { serv_stop $1 || return ; }
is_service_autostart $1 || { info "Service $1 already disabled for startup" && return ; }
is_service_running $SERVICE && { serv_stop $SERVICE || return ; }
is_service_autostart $SERVICE || { info 'Service $SERVICE already disabled for startup' && return ; }
serv_disable $SERVICE
}
......@@ -23,8 +23,9 @@ load_helper serv-status
serv_on()
{
serv_enable "$1" || return
local SERVICE="$1"
serv_enable "$SERVICE" || return
# start if need
is_service_running $1 && info "Service $1 is already running" && return
serv_start $1
is_service_running $SERVICE && info 'Service $SERVICE is already running' && return
serv_start $SERVICE
}
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