examples/var_service/: use "svc" for service commands, other tweaks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user