5 echo "You must be root to start aMule as daemon."
11 .
/etc
/conf.d
/amule.conf
16 echo "Unable to run aMule. You must set the user in /etc/conf.d/amule.conf."
18 elif [[ $AMULEUSER == "root" ]]
20 echo "Unable to run aMule. You must not run aMule as root."
24 confdir
=$
(su
-l $AMULEUSER -c "echo ~")/.aMule
25 logfile
=$
(su
-l $AMULEUSER -c "echo ~")/.aMule
/amuled.log
26 lockfile
=$
(su
-l $AMULEUSER -c "echo ~")/.aMule
/muleLock
28 PID
=`pidof -o %PPID /usr/bin/amuled`
30 [ -f $logfile ] && rm -f $logfile
34 stat_busy
"Starting aMule"
39 echo "Unable to run aMule, it is already running. If you're sure aMule is not already running, you can remove ${lockfile}."
43 [ ! -d $confdir ] && su
-l $AMULEUSER -c "mkdir -p $confdir"
45 [ -z "$PID" ] && su
-l $AMULEUSER -c "/usr/bin/amuled -f" &> /dev
/null
55 stat_busy
"Stopping aMule"
58 [ ! -z "$PID" ] && kill $PID &> /dev
/null
61 echo "Unable to stop aMule. It is not running."
77 echo "usage: $0 {start|stop|restart}"