containers-opendkim/opendkimd.sh

21 lines
389 B
Bash
Raw Normal View History

2019-09-27 20:18:41 +00:00
#!/bin/sh
pid=/tmp/opendkim.pid
case $1 in
2022-03-07 21:18:52 +00:00
stop)
2023-01-03 22:55:40 +00:00
test -f $pid && cat $pid | xargs kill
rm -f $pid
2022-03-07 21:18:52 +00:00
;;
2022-03-15 22:30:22 +00:00
start)
2022-03-07 21:18:52 +00:00
install -dm 2750 -o opendkim -g opendkim /run/opendkim
2019-09-27 20:20:33 +00:00
chown -R opendkim:opendkim /etc/opendkim
2022-03-07 21:18:52 +00:00
/usr/sbin/opendkim
;;
2023-01-03 22:55:40 +00:00
rotate)
test -f $pid || exit 0
test $pid -ot /etc/opendkim/dkim.private && cat $pid | xargs -r kill -USR1
;;
2019-09-27 20:18:41 +00:00
esac