Browse Source

Merge pull request #6847 from pprindeville/syslog-ng-prerm

syslog-ng: stop service when uninstalling/updating
lilik-openwrt-22.03
Philip Prindeville 6 years ago
committed by GitHub
parent
commit
74c088cb82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      admin/syslog-ng/Makefile

+ 16
- 1
admin/syslog-ng/Makefile View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng PKG_NAME:=syslog-ng
PKG_VERSION:=3.17.2 PKG_VERSION:=3.17.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@ -74,4 +74,19 @@ define Package/syslog-ng/install
$(call libtool_remove_files,$(1)) $(call libtool_remove_files,$(1))
endef endef
define Package/syslog-ng/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
# wish we had pidof unconditionally
pid=$(ps | grep syslog | grep -v grep | awk '{ print $$1; }')
[ -n "$$pid" ] && /etc/init.d/syslog-ng stop
[ "$${PKG_UPGRADE}" != "1" ] && {
echo "Removing rc.d symlink for syslog-ng"
/etc/init.d/syslog-ng disable
}
fi
exit 0
endef
$(eval $(call BuildPackage,syslog-ng)) $(eval $(call BuildPackage,syslog-ng))

Loading…
Cancel
Save