Commit daa1cebe authored by Vitaly Lipatov's avatar Vitaly Lipatov

serv: use is_command instead of direct which

parent 5ec242e3
...@@ -99,7 +99,7 @@ is_active_systemd && CMD="systemd" ...@@ -99,7 +99,7 @@ is_active_systemd && CMD="systemd"
SERVICETYPE=$CMD SERVICETYPE=$CMD
ANYSERVICE=$(which anyservice 2>/dev/null) ANYSERVICE=$(print_command_path anyservice)
} }
......
...@@ -33,9 +33,9 @@ serv_test() ...@@ -33,9 +33,9 @@ serv_test()
docmd sshd -t docmd sshd -t
;; ;;
httpd2|httpd|apache|apache2) httpd2|httpd|apache|apache2)
if which httpd2 >/dev/null 2>/dev/null ; then if is_command httpd2 ; then
docmd httpd2 -t docmd httpd2 -t
elif which apache2 >/dev/null 2>/dev/null ; then elif is_command apache2 ; then
docmd apache2 -t docmd apache2 -t
fi fi
;; ;;
......
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