• Bug#265622: imapproxy: bad init script

    From Andelko Horvat@1:229/2 to All on Sat Aug 14 04:00:06 2004
    From: [email protected]

    Package: imapproxy
    Version: 1.2.1-2
    Severity: normal


    You can't use start-stop-daemon with option --pidfile, because imapproxy doesn't create pidfile. I recommend the attached init script.


    -- System Information:
    Debian Release: 3.0
    APT prefers testing
    APT policy: (500, 'testing')
    Architecture: i386 (i686)
    Kernel: Linux 2.4.24-1-686
    Locale: LANG=C, LC_CTYPE=C

    Versions of packages imapproxy depends on:
    ii debconf 1.4.30 Debian configuration management sy ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand ii libssl0.9.7 0.9.7d-4 SSL shared libraries
    ii libwrap0 7.6.dbs-4 Wietse Venema's TCP wrappers libra

    -- debconf information:
    * imapproxy/imap-server: localhost

    #! /bin/sh
    # Initfile for imapproxy
    #
    # skeleton example file to build /etc/init.d/ scripts.
    # This file should be used to construct scripts for /etc/init.d. #
    # Written by Miquel van Smoorenburg <[email protected]>.
    # Modified for Debian GNU/Linux
    # by Ian Murdock <[email protected]>.
    #
    # Version: @(#)skeleton 1.8 03-Mar-1998 [email protected]
    # Customized for UP-ImapProxy by Jose Luis Tallon <[email protected]>

    PATH=/sbin:/bin:/usr/sbin:/usr/bin

    DAEMON=/usr/sbin/imapproxyd
    ARGS="-f /etc/imapproxy.conf"
    NAME="imapproxy"
    DESC="IMAP proxy"

    test -f $DAEMON || exit 0

    set -e

    case "$1" in
    start)
    echo -n "Starting $DESC: $NAME"
    start-stop-daemon --start --oknodo --quiet --exec $DAEMON -- $ARGS
    echo .
    ;;
    stop)
    echo -n "Stopping $DESC: $NAME"
    start-stop-daemon --stop --oknodo --quiet --exec $DAEMON >/dev/null
    echo .
    ;;
    restart|force-reload)
    echo -n "Restarting $DESC: $NAME"
    start-stop-daemon --stop --oknodo --quiet --exec $DAEMON >/dev/null
    sleep 1
    start-stop-daemon --start --oknodo --quiet --exec $DAEMON -- $ARGS
    echo .
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
    esac

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)