3 # this script stops mailman before a Python default runtime change and
4 # restarts it afterwards
6 DESC="Mailman MailingList Server"
8 SCRIPTNAME="/etc/init.d/$NAME"
10 # Read configuration variable file if it is present
11 [ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"
13 # Load the VERBOSE setting and other rcS variables
14 [ -f /etc/default/rcS ] && . /etc/default/rcS
16 # Define LSB log_* functions.
17 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
18 . /lib/lsb/init-functions
20 if [ "$#" != 3 ]; then
21 echo "Usage: $0 {pre-rtupdate|post-rtupdate|rtupdate} <oldruntime> <newruntime>" >&2
31 [ "$VERBOSE" != no ] && log_warning_msg "Stopping $DESC during Python runtime change..."
32 if [ -x "$SCRIPTNAME" ]; then
33 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
34 invoke-rc.d "$NAME" stop
41 [ "$VERBOSE" != no ] && log_warning_msg "Restarting $DESC after Python runtime change..."
42 if [ -x "$SCRIPTNAME" ]; then
43 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
44 invoke-rc.d "$NAME" start
53 echo "$0 called with unknown argument \`$action'" >&2