feat: reload on private key change
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
1d8725136a
commit
217e4ba232
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
check process opendkim with pidfile /tmp/opendkim.pid
|
||||
start program = "/usr/local/bin/opendkimd start"
|
||||
stop program = "/usr/local/bin/opendkimd stop"
|
||||
|
||||
check program key_rotation
|
||||
with path "/usr/local/bin/opendkimd rotate"
|
||||
every 1 cycle
|
||||
if status != 0 then alert
|
||||
|
|
|
@ -4,7 +4,8 @@ pid=/tmp/opendkim.pid
|
|||
|
||||
case $1 in
|
||||
stop)
|
||||
test -f ${pid} && cat ${pid} | xargs kill
|
||||
test -f $pid && cat $pid | xargs kill
|
||||
rm -f $pid
|
||||
;;
|
||||
start)
|
||||
install -dm 2750 -o opendkim -g opendkim /run/opendkim
|
||||
|
@ -12,4 +13,8 @@ case $1 in
|
|||
|
||||
/usr/sbin/opendkim
|
||||
;;
|
||||
rotate)
|
||||
test -f $pid || exit 0
|
||||
test $pid -ot /etc/opendkim/dkim.private && cat $pid | xargs -r kill -USR1
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue