luci-app-watchcat: revert unnecessary quoting in init script

The quoting added in r18 for pinghosts is not needed. Multi-host support
remains fully functional, but the extra quotes caused inconsistent argument
handling between /etc/init.d/watchcat and /usr/bin/watchcat.sh,
especially for single-IP configurations.

This revert removes the unnecessary quoting in the init script and LUCI,
restoring consistent behavior while keeping multiple ping hosts supported.

Fixes: #28100 (watchcat: error if only one address is specified in pinghosts)
Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
(cherry picked from commit 407617b786)
This commit is contained in:
Ivan Diaz
2025-12-23 08:30:29 -05:00
committed by Josef Schlehofer
parent abb72cef72
commit 8134bfb8a4
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=watchcat
PKG_VERSION:=1
PKG_RELEASE:=19
PKG_RELEASE:=20
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@@ -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" "$interface"
procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" "$pinghosts" "$pingperiod" "$pingsize" "$addressfamily" "$interface"
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
;;