FreeBSD/jails/config/cert/acmedns

45 lines
766 B
Plaintext
Raw Permalink Normal View History

2022-04-19 13:38:56 -07:00
#!/bin/sh
2022-04-19 13:46:35 -07:00
# Copyright (c) 2018-2022, diyIT.org
2022-04-19 13:38:56 -07:00
# All rights reserved.
#
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
# https://diyit.org/license/
#
#
# the two lines below are not just comments but required by rcorder; service -e
# PROVIDE: acmedns
# REQUIRE: NETWORKING DAEMON
. /etc/rc.subr
: ${acmedns_enable="NO"}
name=acmedns
rcvar=${name}_enable
ACMEDNS="/usr/local/bin/acme-dns"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
restart_cmd="${name}_restart"
acmedns_start()
{
$ACMEDNS -c /etc/acme-dns/config.cfg &
}
acmedns_stop()
{
ps ax | grep -ie acme-dns | grep -v grep | awk '{print $1}' | xargs kill -9
}
acmedns_restart()
{
acmedns_stop
acmedns_start
}
load_rc_config ${name}
run_rc_command "$1"