aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dkimproxy/dkimproxy.in.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/dkimproxy/dkimproxy.in.initd')
-rw-r--r--testing/dkimproxy/dkimproxy.in.initd27
1 files changed, 23 insertions, 4 deletions
diff --git a/testing/dkimproxy/dkimproxy.in.initd b/testing/dkimproxy/dkimproxy.in.initd
index 1649f66da7..0eb5a9b89e 100644
--- a/testing/dkimproxy/dkimproxy.in.initd
+++ b/testing/dkimproxy/dkimproxy.in.initd
@@ -1,12 +1,31 @@
#!/sbin/runscript
-command="/usr/sbin/${RC_SVCNAME}"
-command_args="${OPTS}"
-pidfile="/var/run/${RC_SVCNAME}.pid"
-description="SMTP proxy that verifies signature on incomming messages"
+description="SMTP proxy that verifies signature on incoming messages"
depend() {
need net
after firewall
}
+checkconfig() {
+ if [ ! -f ${CONFIGFILE} ]; then
+ eerror "Missing configuration file ${CONFIGFILE}"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting dkimproxy.in"
+ start-stop-daemon --start -q --exec /usr/sbin/dkimproxy.in \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ -- --conf_file=${CONFIGFILE} ${OPTS}
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping dkimproxy.in"
+ start-stop-daemon --stop -q --pidfile "${PIDFILE}"
+ eend $?
+}