You are not logged in.

#1 2005-11-01 01:19:12

ilmorris
Member
Registered: 2005-07-28
Posts: 55

amuled - Start at Boot

Howdy,

Just wondering, is there anyone that has setup amuled to start at boot?  I would like to set it up to run at boot, if possible.  I've done some research on the amule wiki, but can't get any real information regarding how to set it up, and what the preferred way of doing the setup would be.

Also, is there a package of amule out there that was built with amuleweb functionality?  I keep trying to turn on the amuleweb function within aMule, but it tells me that I need to re-compile using the -amuleweb flag.

Thanks in advance.

Offline

#2 2005-11-01 07:58:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: amuled - Start at Boot

Put the command you use to run it in /etc/rc.local.

As for the recompiling, go to the wiki and read about the Arch Build System (ABS).

Offline

#3 2005-11-01 18:56:14

ilmorris
Member
Registered: 2005-07-28
Posts: 55

Re: amuled - Start at Boot

tomk wrote:

Put the command you use to run it in /etc/rc.local.

If i start amuled this way, is there a way to specify a user account under which to run the process?

tomk wrote:

As for the recompiling, go to the wiki and read about the Arch Build System (ABS).

This worked like a charm!  First time I have ever used the Arch Build System.  Thanks for the advice.

Offline

#4 2005-11-02 14:43:58

sh__
Member
Registered: 2005-07-19
Posts: 271

Re: amuled - Start at Boot

ilmorris wrote:
tomk wrote:

Put the command you use to run it in /etc/rc.local.

If i start amuled this way, is there a way to specify a user account under which to run the process?

sudo -H -u username amuled &

Offline

#5 2006-02-03 23:30:24

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 913

Re: amuled - Start at Boot

May be it is too late, but I have written a little initscript to run amuled as a system service: feel free to test it and report any problem. The script as it is runs amuled as user 'p2p': you obviously need to create such a user (it would be interesting to create a PKGBUILD which creates this user and includes such a script: if anyone else is interested, I can try). As an alternative, you can easily modify the script, replacing p2p with the user you like.
Please put the following in /etc/rc.d/amuled, make it executable and eventually add amuled in the correct line in /etc/rc.conf.

#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/amuled`
case "$1" in
  start)
    stat_busy "Starting amuled"
    [ -z "$PID" ] && su -l p2p -c "/usr/bin/amuled &" 2&>1
    if [ $? -gt 0 ]; then
      stat_fail
    else
    echo $PID > /var/run/amuled.pid
    add_daemon amuled
    stat_done
    fi
    ;;
  stop)
stat_busy "Stopping amuled"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
    rm_daemon amuled
    stat_done
    fi
    ;;
 restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0

Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB