/etc/init.d/policyd-weight is in policyd-weight 0.1.15.2-12.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | #! /bin/sh
#
### BEGIN INIT INFO
# Provides: policyd-weight
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the policyd-weight daemon
# Description: Perl policy daemon for the Postfix MTA
### END INIT INFO
#
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/policyd-weight
NAME=policyd-weight
DESC="policyd-weight"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
ret=0
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
if start-stop-daemon --start --oknodo --quiet \
--pidfile $PIDFILE --name $NAME \
--exec $DAEMON start -- $DAEMON_OPTS
then
log_end_msg 0
else
ret=$?
log_end_msg 1
fi
;;
stop)
log_daemon_msg "Stopping $DESC (incl. cache)" "$NAME"
if $DAEMON -k && start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE && rm -f $PIDFILE
then
log_end_msg 0
else
ret=$?
log_end_msg 1
fi
;;
dstop)
log_daemon_msg "Stopping $DESC (without cache)" "$NAME"
if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE && rm -f $PIDFILE
then
log_end_msg 0
else
ret=$?
log_end_msg 1
fi
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC configuration files" "$NAME"
if $DAEMON $DAEMON_OPTS reload > /dev/null 2>&1
then
log_end_msg 0
else
log_end_msg 1
ret=$?
fi
;;
restart)
log_daemon_msg "Restarting $DESC configuration (incl. cache)" "$NAME"
if $DAEMON -k && start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
&& rm -f $PIDFILE \
&& start-stop-daemon --start --oknodo --quiet \
--pidfile $PIDFILE --name $NAME \
--exec $DAEMON start -- $DAEMON_OPTS
then
log_end_msg 0
else
ret=$?
log_end_msg 1
fi
;;
drestart)
log_daemon_msg "Restarting $DESC configuration (without cache)" "$NAME"
if $DAEMON $DAEMON_OPTS restart > /dev/null 2>&1
then
log_end_msg 0
else
ret=$?
log_end_msg 1
fi
;;
status)
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|dstop|reload|force-reload|restart|drestart}" >&2
exit 1
;;
esac
exit $ret
|