Variable expansion related cleanup for man pages and sysv init

This commit is contained in:
Scott Kitterman
2020-01-03 17:11:43 -05:00
parent 8a2760531b
commit 1545d13fa0
4 changed files with 19 additions and 21 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
# This is a basic configuration that can easily be adapted to suit a standard # This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see dkimpy-milter.conf(5) and/or # installation. For more advanced options, see dkimpy-milter.conf(5).
# /usr/share/doc/dkimpy-milter/examples/opendkim.conf.sample.
# Log to syslog # Log to syslog
Syslog yes Syslog yes
@@ -19,8 +18,6 @@ UMask 007
#Canonicalization relaxed/simple #Canonicalization relaxed/simple
#Mode sv #Mode sv
# Socket local:/run/dkimpy-milter/dkimpy-milter.sock
#
# ## Socket socketspec # ## Socket socketspec
# ## # ##
# ## Names the socket where this filter should listen for milter connections # ## Names the socket where this filter should listen for milter connections
@@ -30,6 +27,8 @@ UMask 007
# ## inet:port to listen on all interfaces # ## inet:port to listen on all interfaces
# ## local:/path/to/socket to listen on a UNIX domain socket # ## local:/path/to/socket to listen on a UNIX domain socket
# #
#Socket local:/run/dkimpy-milter/dkimpy-milter.sock
#
#Socket inet:8892@localhost #Socket inet:8892@localhost
## PidFile filename ## PidFile filename
+3 -4
View File
@@ -1,6 +1,5 @@
# This is a basic configuration that can easily be adapted to suit a standard # This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see dkimpy-milter.conf(5) and/or # installation. For more advanced options, see dkimpy-milter.conf(5).
# /usr/share/doc/dkimpy-milter/examples/opendkim.conf.sample.
# Log to syslog # Log to syslog
Syslog yes Syslog yes
@@ -19,8 +18,6 @@ UMask 007
#Canonicalization relaxed/simple #Canonicalization relaxed/simple
#Mode sv #Mode sv
# Socket local:@RUNSTATEDIR@/dkimpy-milter.sock
#
# ## Socket socketspec # ## Socket socketspec
# ## # ##
# ## Names the socket where this filter should listen for milter connections # ## Names the socket where this filter should listen for milter connections
@@ -30,6 +27,8 @@ UMask 007
# ## inet:port to listen on all interfaces # ## inet:port to listen on all interfaces
# ## local:/path/to/socket to listen on a UNIX domain socket # ## local:/path/to/socket to listen on a UNIX domain socket
# #
#Socket local:@RUNSTATEDIR@/dkimpy-milter.sock
#
#Socket inet:8892@localhost #Socket inet:8892@localhost
## PidFile filename ## PidFile filename
+2 -4
View File
@@ -18,10 +18,8 @@
# Short-Description: dkimpy-milter # Short-Description: dkimpy-milter
# Description: Python DKIM Milter for Sendmail and Postfix # Description: Python DKIM Milter for Sendmail and Postfix
### END INIT INFO ### END INIT INFO
prefix="/usr/local" sysconfdir="/usr/local/etc/dkimpy-milter"
exec_prefix=${prefix} bindir="/usr/local/bin"
sysconfdir="/usr/local/etc"
bindir="${exec_prefix}/bin/"
RUNDIR="/run/dkimpy-milter" RUNDIR="/run/dkimpy-milter"
DAEMON=${bindir}/dkimpy-milter DAEMON=${bindir}/dkimpy-milter
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin: PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:
+9 -7
View File
@@ -33,8 +33,8 @@ test -x $DAEMON || exit 0
# Include dkimpy-python defaults if available # Include dkimpy-python defaults if available
# Typically not used # Typically not used
if [ -f @SYSCONFDIR@/default/dkimpy-milter ] ; then if [ -f $sysconfdir/default/dkimpy-milter ] ; then
. @SYSCONFDIR@/default/dkimpy-milter . $sysconfdir/default/dkimpy-milter
fi fi
set -e set -e
@@ -65,14 +65,14 @@ case "$1" in
fi fi
fi fi
fi fi
start-stop-daemon --start --background --quiet --pidfile \
start-stop-daemon --start --quiet --pidfile $RUNDIR/$NAME.pid --startas \ $RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf
$DAEMON $sysconfdir/$NAME.conf --name $NAME --test > /dev/null \
echo "$NAME." echo "$NAME."
;; ;;
stop) stop)
echo -n "Stopping $DESC: " echo -n "Stopping $DESC: "
if [ -f $RUNDIR/$NAME.pid ]; then if [ -f $RUNDIR/$NAME.pid ]; then
chown root:root $RUNDIR/$NAME.pid
start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
rm $RUNDIR/$NAME.pid rm $RUNDIR/$NAME.pid
#echo $SOCKET #echo $SOCKET
@@ -85,6 +85,7 @@ case "$1" in
force-reload) force-reload)
echo -n "Force reloading $DESC: " echo -n "Force reloading $DESC: "
if [ -f $RUNDIR/$NAME.pid ]; then if [ -f $RUNDIR/$NAME.pid ]; then
chown root:root $RUNDIR/$NAME.pid
start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
rm $RUNDIR/$NAME.pid rm $RUNDIR/$NAME.pid
#echo $SOCKET #echo $SOCKET
@@ -93,7 +94,7 @@ case "$1" in
fi fi
fi fi
sleep 1 sleep 1
start-stop-daemon --start --chuid $USER --background --quiet --pidfile \ start-stop-daemon --start --background --quiet --pidfile \
$RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf $RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf
echo "$NAME." echo "$NAME."
;; ;;
@@ -101,6 +102,7 @@ case "$1" in
echo "Restarting $DESC: " echo "Restarting $DESC: "
echo -n "Stopping $DESC: " echo -n "Stopping $DESC: "
if [ -f $RUNDIR/$NAME.pid ]; then if [ -f $RUNDIR/$NAME.pid ]; then
chown root:root $RUNDIR/$NAME.pid
start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid start-stop-daemon --stop --pidfile $RUNDIR/$NAME.pid
rm $RUNDIR/$NAME.pid rm $RUNDIR/$NAME.pid
#echo $SOCKET #echo $SOCKET
@@ -111,7 +113,7 @@ case "$1" in
echo "$NAME." echo "$NAME."
sleep 1 sleep 1
echo -n "Starting $DESC: " echo -n "Starting $DESC: "
start-stop-daemon --start --chuid $USER --background --quiet --pidfile \ start-stop-daemon --start --background --quiet --pidfile \
$RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf $RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf
echo "$NAME." echo "$NAME."
;; ;;