/etc/init.d/mixmaster is in mixmaster 3.0.0-7build1.
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 | #!/bin/sh
#
# Start/Stop the Mixmaster daemon
### BEGIN INIT INFO
# Provides: mixmaster
# Required-Start: $local_fs $remote_fs $named $network $time
# Required-Stop: $local_fs $remote_fs $named $network
# Should-Start: mail-transport-agent
# Should-Stop: mail-transport-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Anonymous remailer client and server
# Description: Mixmaster is the reference implementation
# of the type II remailer protocol
# which is also called Mixmaster.
### END INIT INFO
set -e
DESC="Mixmaster Daemon"
NAME="mixmaster"
DAEMON="/usr/bin/mixmaster"
ARGS="--daemon --no-ask-passphrase"
USER=mixmaster
GROUP=mixmaster
REMAILCONFIGFILE=/etc/mixmaster/remailer.conf
# whitespace for some grep magic
WS="[ `printf \\\t`]"
WSE="[= `printf \\\t`]"
grep_from_mix() {
VALUE=`grep "^$WS*$1$WSE" $REMAILCONFIGFILE | tail -n 1 | sed -e "s,^$WS*[a-zA-Z0-9_-]*$WS*\(\|=$WS*\),,"`
}
convert_bool() {
if [ "$1" = "false" ] ; then
if [ "$VALUE" = "y" -o "$VALUE" = "Y" ] ; then VALUE="true"; else VALUE="false"; fi
else
if [ "$VALUE" = "n" -o "$VALUE" = "n" ] ; then VALUE="false"; else VALUE="true"; fi
fi;
}
[ -x $DAEMON ] || exit 0
[ -e $REMAILCONFIGFILE ] || exit 0
# ensure pid file directory exists
if [ ! -e /var/run/mixmaster ]; then
mkdir -m 02775 /var/run/mixmaster
chown root:mixmaster /var/run/mixmaster
fi
. /lib/lsb/init-functions
case $1 in
start)
grep_from_mix REMAIL; convert_bool false;
if [ ! "$VALUE" = "true" ]; then
echo "Not starting $DESC: remailer mode not enabled in $REMAILCONFIGFILE."
log_success_msg "Not starting $DESC: remailer mode not enabled in $REMAILCONFIGFILE."
exit 0;
fi
grep_from_mix PASSPHRASE
if [ "$VALUE" = "" ]; then
echo "Not starting $DESC: Passphrase must be set in $REMAILCONFIGFILE." >&2
log_failure_msg "Not starting $DESC: Passphrase must be set in $REMAILCONFIGFILE."
exit 1;
fi
log_begin_msg "Starting $DESC..."
start-stop-daemon --start --quiet --user $USER --chuid $USER:$GROUP --exec $DAEMON -- $ARGS || { log_end_msg 1; exit 1; }
log_end_msg 0
;;
stop)
log_begin_msg "Stopping $DESC..."
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/mixmaster/mixmaster.pid --user $USER --exec $DAEMON || { log_end_msg 1; exit 1; }
log_end_msg 0
;;
reload|force-reload|restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: $0 (start|stop|reload|force-reload|restart)" >&2
exit 1
;;
esac
exit 0
# vim:set ts=2:
# vim:set shiftwidth=2:
|