summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--contrib/package/freifunk-watchdog/Makefile2
-rw-r--r--contrib/package/freifunk-watchdog/files/sysupgrade.hook7
2 files changed, 9 insertions, 0 deletions
diff --git a/contrib/package/freifunk-watchdog/Makefile b/contrib/package/freifunk-watchdog/Makefile
index fc1e9d7e05..439e0478c5 100644
--- a/contrib/package/freifunk-watchdog/Makefile
+++ b/contrib/package/freifunk-watchdog/Makefile
@@ -47,6 +47,8 @@ define Package/freifunk-watchdog/install
$(INSTALL_BIN) ./files/freifunk-watchdog.init $(1)/etc/init.d/freifunk-watchdog
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ffwatchd $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/lib/upgrade
+ $(INSTALL_DATA) ./files/sysupgrade.hook $(1)/lib/upgrade/kill-ffwatchd.sh
endef
$(eval $(call BuildPackage,freifunk-watchdog))
diff --git a/contrib/package/freifunk-watchdog/files/sysupgrade.hook b/contrib/package/freifunk-watchdog/files/sysupgrade.hook
new file mode 100644
index 0000000000..e124c39c50
--- /dev/null
+++ b/contrib/package/freifunk-watchdog/files/sysupgrade.hook
@@ -0,0 +1,7 @@
+kill_freifunk_watchdog() {
+ v "Terminating ffwatchd..."
+ killall ffwatchd
+ killall crond
+}
+
+export sysupgrade_pre_upgrade="${sysupgrade_pre_upgrade:+$sysupgrade_pre_upgrade }kill_freifunk_watchdog"