From aa75a7da7f3b0bb50be82f535244137bae423fa8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 3 Jul 2018 17:02:50 +0200 Subject: examples/var_service/: use "svc" for service commands, other tweaks Signed-off-by: Denys Vlasenko --- examples/var_service/dhcp_if_pinger/run | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/var_service/dhcp_if_pinger') diff --git a/examples/var_service/dhcp_if_pinger/run b/examples/var_service/dhcp_if_pinger/run index 8aca90c..2534124 100755 --- a/examples/var_service/dhcp_if_pinger/run +++ b/examples/var_service/dhcp_if_pinger/run @@ -21,9 +21,9 @@ if test -f "$0.log"; then mv "$0.log.new" "$0.log" fi -test -f "/var/service/dhcp_$if/env.out" || exec env - sleep "$ping_time" +test -f "../dhcp_$if/env.out" || exec env - sleep "$ping_time" -. "/var/service/dhcp_$if/env.out" +. "../dhcp_$if/env.out" test x"$router" != x"" || exec env - sleep "$ping_time" #msg "Pinging $router" @@ -36,12 +36,12 @@ while true; do env - sleep "$retry_time" done -test -d "/var/service/dhcp_$if" && { - msg "Restarting /var/service/dhcp_$if" - sv t "/var/service/dhcp_$if" +test -d "../dhcp_$if" && { + msg "Restarting dhcp_$if" + svc -t "dhcp_$if" } -test -d "/var/service/supplicant_$if" && { - msg "Restarting /var/service/supplicant_$if" - sv t "/var/service/supplicant_$if" +test -d "../supplicant_$if" && { + msg "Restarting supplicant_$if" + svc -t "supplicant_$if" } exec env - sleep "$ping_time" -- cgit v1.1