acme: Add package.

This adds a package wrapping the acme.sh script from
https://github.com/Neilpang/acme.sh in Uci config and hooks to interact
correctly with uhttpd.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
This commit is contained in:
Toke Høiland-Jørgensen
2016-08-05 17:26:25 +02:00
parent 10c7c26203
commit a1d617bd8b
5 changed files with 261 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=50
SCRIPT=/usr/lib/acme/run-acme
start_service()
{
procd_open_instance
procd_set_param command $SCRIPT
procd_set_param file /etc/config/acme
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
reload_service() {
rc_procd start_service "$@"
return 0
}
stop_service() {
return 0
}
boot() {
$SCRIPT check_cron
}
service_triggers()
{
procd_add_reload_trigger acme
}