|
|
|
|
@@ -39,7 +39,7 @@ config_watchcat() {
|
|
|
|
|
config_get forcedelay "$1" forcedelay "60"
|
|
|
|
|
config_get pingsize "$1" pingsize "standard"
|
|
|
|
|
config_get interface "$1" interface
|
|
|
|
|
config_get mmifacename "$1" mmifacename
|
|
|
|
|
config_get mmifacename "$1" mmifacename "null"
|
|
|
|
|
config_get_bool unlockbands "$1" unlockbands "0"
|
|
|
|
|
config_get addressfamily "$1" addressfamily "any"
|
|
|
|
|
config_get script "$1" script
|
|
|
|
|
@@ -73,7 +73,7 @@ config_watchcat() {
|
|
|
|
|
append_string "warn" "pingperiod cannot be a negative value." "; "
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$mmifacename" != "" ] && [ "$period" -lt 30 ]; then
|
|
|
|
|
if [ "$mmifacename" != "null" ] && [ "$period" -lt 30 ]; then
|
|
|
|
|
append_string "error" "Check interval is less than 30s. For robust operation with ModemManager modem interfaces it is recommended to set the period to at least 30s."
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
@@ -104,19 +104,19 @@ config_watchcat() {
|
|
|
|
|
;;
|
|
|
|
|
ping_reboot)
|
|
|
|
|
procd_open_instance "watchcat_${1}"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" "$pinghosts" "$pingperiod" "$pingsize" "$addressfamily"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" \"$pinghosts\" "$pingperiod" "$pingsize" "$addressfamily"
|
|
|
|
|
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
|
|
|
|
procd_close_instance
|
|
|
|
|
;;
|
|
|
|
|
restart_iface)
|
|
|
|
|
procd_open_instance "watchcat_${1}"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "restart_iface" "$period" "$pinghosts" "$pingperiod" "$pingsize" "$interface" "$mmifacename" "$unlockbands" "$addressfamily"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "restart_iface" "$period" \"$pinghosts\" "$pingperiod" "$pingsize" "$interface" "$mmifacename" "$unlockbands" "$addressfamily"
|
|
|
|
|
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
|
|
|
|
procd_close_instance
|
|
|
|
|
;;
|
|
|
|
|
run_script)
|
|
|
|
|
procd_open_instance "watchcat_${1}"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "run_script" "$period" "$pinghosts" "$pingperiod" "$pingsize" "$interface" "$addressfamily" "$script"
|
|
|
|
|
procd_set_param command /usr/bin/watchcat.sh "run_script" "$period" \"$pinghosts\" "$pingperiod" "$pingsize" "$interface" "$addressfamily" "$script"
|
|
|
|
|
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
|
|
|
|
procd_close_instance
|
|
|
|
|
;;
|
|
|
|
|
|