aboutsummaryrefslogtreecommitdiffstats
path: root/main/dkimproxy/dkimproxy.out.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/dkimproxy/dkimproxy.out.initd')
-rw-r--r--main/dkimproxy/dkimproxy.out.initd38
1 files changed, 15 insertions, 23 deletions
diff --git a/main/dkimproxy/dkimproxy.out.initd b/main/dkimproxy/dkimproxy.out.initd
index 87c5df94a3..ed8fdc356a 100644
--- a/main/dkimproxy/dkimproxy.out.initd
+++ b/main/dkimproxy/dkimproxy.out.initd
@@ -1,31 +1,23 @@
#!/sbin/openrc-run
+# Upper case variables are here only for backward compatibility.
+: ${cfgfile:=${CONFIGFILE:-"/etc/dkimproxy/dkimproxy_out.conf"}}
+: ${user:="root"} # root is default just for backward compatibility
+: ${group:="$user"}
+
description="SMTP proxy that verifies signature on outgoing messages"
-depend() {
- need net
- after firewall
-}
+command="/usr/sbin/dkimproxy.out"
+command_args="--conf_file=$cfgfile ${command_args:-${OPTS:-}}"
+command_background="yes"
-checkconfig() {
- if [ ! -f ${CONFIGFILE} ]; then
- eerror "Missing configuration file ${CONFIGFILE}"
- return 1
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting dkimproxy.out"
- start-stop-daemon --start -q --exec /usr/sbin/dkimproxy.out \
- --pidfile "${PIDFILE}" --make-pidfile --background \
- -- --conf_file=${CONFIGFILE} ${OPTS}
- eend $?
-}
+pidfile="/run/$RC_SVCNAME.pid"
+start_stop_daemon_args="--user $user --group $group"
+required_files="$cfgfile"
-stop() {
- ebegin "Stopping dkimproxy.out"
- start-stop-daemon --stop -q --pidfile "${PIDFILE}"
- eend $?
+depend() {
+ need net
+ before opensmtpd postfix smtpd
+ after firewall
}