acme: remove cron entry on package removal 12346/head
authorWren Turkal <wt@penguintechs.org>
Thu, 28 May 2020 06:20:21 +0000 (23:20 -0700)
committerWren Turkal <wt@penguintechs.org>
Sun, 31 May 2020 05:51:14 +0000 (22:51 -0700)
Previously, the cron config was not removed on uninstall. This change fixes
that.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
net/acme/Makefile

index b3dd099885c8ba37e765daf7110834be14ade2bc..3a65e8cad39388ec1d0136bad89255cec63bc20c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acme
 PKG_VERSION:=2.8.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/acmesh-official/acme.sh/archive/$(PKG_VERSION).tar.gz
@@ -57,6 +57,11 @@ define Package/acme/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/acme.sh $(1)/usr/lib/acme/acme.sh
 endef
 
+define Package/acme/prerm
+#!/bin/sh
+sed -i '/\/etc\/init\.d\/acme start/d' /etc/crontabs/root
+endef
+
 define Package/acme-dnsapi
   SECTION:=net
   CATEGORY:=Network