37 lines
954 B
Diff
37 lines
954 B
Diff
--- OpenDMARC-rel-opendmarc-1-4-1-1/contrib/init/generic/opendmarc.orig 2021-04-30 18:34:43.000000000 +0200
|
|
+++ OpenDMARC-rel-opendmarc-1-4-1-1/contrib/init/generic/opendmarc 2021-08-15 04:11:56.270775519 +0200
|
|
@@ -19,18 +19,19 @@
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
-prefix=/usr/local
|
|
-exec_prefix=${prefix}
|
|
+prefix=
|
|
+exec_prefix=/usr
|
|
|
|
RETVAL=0
|
|
prog="opendmarc"
|
|
|
|
DAEMON=${exec_prefix}/sbin/$prog
|
|
CONF_FILE=${prefix}/etc/$prog.conf
|
|
-PID_FILE=${prefix}/var/run/$prog/$prog.pid
|
|
+RUN_DIR=${prefix}/var/run/$prog
|
|
+PID_FILE=$RUN_DIR/$prog.pid
|
|
|
|
-if [ -f /etc/sysconfig/opendmarc ]; then
|
|
- . /etc/sysconfig/opendmarc
|
|
+if [ -f /etc/default/opendmarc ]; then
|
|
+ . /etc/default/opendmarc
|
|
fi
|
|
|
|
start() {
|
|
@@ -40,6 +41,8 @@
|
|
echo OpenDMARC already running as pid $PID
|
|
exit 2;
|
|
else
|
|
+ mkdir -p $RUN_DIR
|
|
+ chown $prog:$prog $RUN_DIR
|
|
daemon $DAEMON -c $CONF_FILE -P $PID_FILE
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/opendmarc
|