Package: amule-daemon
Version: 2.1.0-1
Severity: wishlist

It would be nice to include an init script for starting and stopping the amule 
daemon on system start/stop.
However I think it should not be enabled by default.

I have some working solution, a bit messy...


#! /bin/sh

PATH=/bin:/usr/bin:/usr/local/bin/:/sbin/:/usr/sbin/
DAEMON=/usr/bin/amuled
WEBDAEMON=/usr/bin/amuleweb
USER=toni

case "$1" in
  start)
    echo -n "Starting aMule : amuled"
    export HOME=/home/$USER/
    start-stop-daemon --chuid $USER --user $USER --start --exec $DAEMON 
--background
    export HOME=/root/
    echo "."
    ;;
  stop)
    echo -n "Stopping aMule : amuled"
    start-stop-daemon --stop --retry 5 --oknodo --quiet --chuid $USER --user 
$USER --exec $DAEMON
    echo "."
    echo -n "Stopping aMuleWeb : amuleweb"
    start-stop-daemon --stop --retry 5 --oknodo --quiet --chuid $USER --user 
$USER --exec $WEBDAEMON
    echo "."
    ;;
  reload)
    echo "Not implemented."
    ;;
  force-reload|restart)
    sh $0 stop
    sh $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/amuled-server 
{start|stop|restart|force-reload|reload}"
    exit 1
    ;;
esac

exit 0 



-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-pau
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)

Versions of packages amule-daemon depends on:
ii  amule-common                  2.1.0-1    common files for aMule
ii  libc6                         2.3.5-11   GNU C Library: Shared libraries an
ii  libcrypto++5.2c2a             5.2.1c2a-2 General purpose cryptographic shar
ii  libgcc1                       1:4.0.2-5  GCC support library
ii  libpng12-0                    1.2.8rel-5 PNG library - runtime
ii  libreadline5                  5.1-5      GNU readline and history libraries
ii  libstdc++6                    4.0.2-5    The GNU Standard C++ Library v3
ii  libwxgtk2.6-0                 2.6.1.2    wxWidgets Cross-platform C++ GUI t
ii  zlib1g                        1:1.2.3-9  compression library - runtime

amule-daemon recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to