acme: fix incompatibilty with image builder

Signed-off-by: Glen Huang <i@glenhuang.com>
This commit is contained in:
Glen Huang 2023-03-03 11:08:32 +08:00 committed by Toke Høiland-Jørgensen
parent 82720ba624
commit e1f03d7ee4
2 changed files with 8 additions and 4 deletions

View file

@ -50,13 +50,17 @@ endef
define Package/acme-common/postinst
#!/bin/sh
grep -q '/etc/init.d/acme' /etc/crontabs/root 2>/dev/null && exit 0
echo "0 0 * * * /etc/init.d/acme start" >> /etc/crontabs/root
if [ -z "$$IPKG_INSTROOT" ]; then
grep -q '/etc/init.d/acme' /etc/crontabs/root 2>/dev/null && exit 0
echo "0 0 * * * /etc/init.d/acme start" >> /etc/crontabs/root
fi
endef
define Package/acme-common/prerm
#!/bin/sh
sed -i '\|/etc/init.d/acme|d' /etc/crontabs/root
if [ -z "$$IPKG_INSTROOT" ]; then
sed -i '\|/etc/init.d/acme|d' /etc/crontabs/root
fi
endef
define Build/Configure

View file

@ -9,7 +9,7 @@ HOOK=/usr/lib/acme/hook
LOG_TAG=acme
# shellcheck source=net/acme/files/functions.sh
. /usr/lib/acme/functions.sh
. "$IPKG_INSTROOT/usr/lib/acme/functions.sh"
cleanup() {
log debug "cleaning up"