mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
acme: remove crontab entry if service is stopped
Until now it was not possible to stop the acme service, because the handling was done via cron. With this change, the acme handler can now be stopped by calling '/etc/init.d/acme' stop. This call removes the entry from the crontab. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
committed by
Toke Høiland-Jørgensen
parent
e73688d178
commit
692f3afe4a
@@ -150,6 +150,14 @@ service_started() {
|
|||||||
echo "Certificate renewal enabled via cron. To renew now, run '/etc/init.d/acme renew'."
|
echo "Certificate renewal enabled via cron. To renew now, run '/etc/init.d/acme renew'."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stop_service() {
|
||||||
|
sed -i '\|/etc/init.d/acme|d' /etc/crontabs/root
|
||||||
|
}
|
||||||
|
|
||||||
|
service_stopped() {
|
||||||
|
echo "Certificate renewal is disabled."
|
||||||
|
}
|
||||||
|
|
||||||
service_triggers() {
|
service_triggers() {
|
||||||
procd_add_config_trigger config.change acme \
|
procd_add_config_trigger config.change acme \
|
||||||
/etc/init.d/acme renew
|
/etc/init.d/acme renew
|
||||||
|
|||||||
Reference in New Issue
Block a user