From: Jo-Philipp Wich Date: Wed, 13 May 2009 00:44:27 +0000 (+0000) Subject: contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before... X-Git-Tag: 0.9.0~460 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=81a3c7b2d2c5260eebf386585cde2281553b6ba4;p=oweals%2Fluci.git contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before system upgrade --- diff --git a/contrib/package/freifunk-watchdog/Makefile b/contrib/package/freifunk-watchdog/Makefile index fc1e9d7e0..439e0478c 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 000000000..e124c39c5 --- /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"