contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before system upgrade
This commit is contained in:
parent
2399dafe57
commit
81a3c7b2d2
2 changed files with 9 additions and 0 deletions
|
@ -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))
|
||||
|
|
7
contrib/package/freifunk-watchdog/files/sysupgrade.hook
Normal file
7
contrib/package/freifunk-watchdog/files/sysupgrade.hook
Normal file
|
@ -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"
|
Loading…
Reference in a new issue