You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
386 B
19 lines
386 B
# Calculate chmod=755 path=/usr/sbin
|
|
#!/bin/bash
|
|
|
|
# Daemon restarts crashed services
|
|
# list the monitored services in /etc/conf.d/check-crashed
|
|
RC_MONITOR_RESTART=$@;
|
|
|
|
while true; do
|
|
for svc in $(rc-status --crashed) ; do
|
|
for chk in $RC_MONITOR_RESTART ; do
|
|
if [ "$chk" = "$svc" ] ; then
|
|
rc-service $svc -- --nodeps restart
|
|
continue 2
|
|
fi
|
|
done
|
|
done
|
|
sleep 1
|
|
done
|