1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/opendkim/opendkim.initd
Valery Kartel f471c42b59 community/opendkim: fixes in build
fix user creation and db directory permissions
fix init.d script - explictly set process-owner and pid-file.
add post-install to generate initial keypair
move non-server binaries and perl-depended script to -utils subpackage
2017-02-07 14:04:33 +02:00

22 lines
559 B
Text

#!/sbin/openrc-run
owner=opendkim
pidfile=/run/opendkim/opendkim.pid
cfgfile=/etc/opendkim/opendkim.conf
command=/usr/sbin/opendkim
command_args="$command_args -u $owner -f"
command_background=yes
required_files="$cfgfile"
depend() {
need net
before mta
}
start_pre() {
local socket=$(grep ^Socket.*local: $cfgfile | cut -d: -f2)
local basedir=$(grep ^BaseDirectory $cfgfile | awk '{print $2}')
[ "${socket:0:1}" = "/" ] && checkpath -d -o $owner ${socket%/*}
[ "$basedir" ] && checkpath -d -o $owner $basedir
checkpath -d -o $owner ${pidfile%/*}
}