diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index bd45dc8cdb..5da836a222 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate PKG_VERSION:=3.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/25-travelmate.hotplug b/net/travelmate/files/25-travelmate.hotplug index 1be2b49245..2e929f6302 100755 --- a/net/travelmate/files/25-travelmate.hotplug +++ b/net/travelmate/files/25-travelmate.hotplug @@ -13,14 +13,14 @@ trm_ntplock="/var/run/travelmate/travelmate.ntp.lock" # [ ! -d "${trm_ntplock%/*}" ] && mkdir -p "${trm_ntplock%/*}" -# check for ntp hotplug event and travelmate service autostart condition +# check for ntp hotplug event and an enabled or running travelmate service # case "${stratum}" in "") ;; *[!0-9]*) exit 0 ;; *) [ "${stratum}" -lt "16" ] || exit 0 ;; esac -if [ "${ACTION}" = "stratum" ] && "${trm_init}" enabled; then +if [ "${ACTION}" = "stratum" ] && { "${trm_init}" enabled || "${trm_init}" running; }; then if mkdir "${trm_ntplock}" 2>/dev/null; then logger -p user.info -t "trm-ntp" "get ntp time sync (stratum: ${stratum:-"-"})" fi diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init index 476dd32026..02e11e50fb 100755 --- a/net/travelmate/files/travelmate.init +++ b/net/travelmate/files/travelmate.init @@ -30,25 +30,20 @@ boot() { } start_service() { - if "${trm_init}" enabled; then - # no instance on boot (the interface trigger starts it) and none as - # long as travelmate is disabled, the triggers stay in place - if [ "${action}" = "boot" ] || [ "$(uci_get travelmate global trm_enabled "0")" != "1" ]; then - return 0 - fi - mkdir -p "${trm_pidfile%/*}" - printf "%s" "${1:-"${action}"}" >"${trm_actionfile}" - procd_open_instance "travelmate" - procd_set_param command "${trm_daemon}" run - procd_set_param pidfile "${trm_pidfile}" - procd_set_param nice "$(uci_get travelmate global trm_nice "0")" - procd_set_param stdout 0 - procd_set_param stderr 1 - procd_close_instance - else - logger -p user.err -t "trm-init" "travelmate service autostart is disabled" - return 1 + # no instance on boot (the interface trigger starts it) and none as + # long as travelmate is disabled, the triggers stay in place + if [ "${action}" = "boot" ] || [ "$(uci_get travelmate global trm_enabled "0")" != "1" ]; then + return 0 fi + mkdir -p "${trm_pidfile%/*}" + printf "%s" "${1:-"${action}"}" >"${trm_actionfile}" + procd_open_instance "travelmate" + procd_set_param command "${trm_daemon}" run + procd_set_param pidfile "${trm_pidfile}" + procd_set_param nice "$(uci_get travelmate global trm_nice "0")" + procd_set_param stdout 0 + procd_set_param stderr 1 + procd_close_instance } reload_service() {