aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2]

Author Topic: Amule remote connection init script  (Read 9252 times)

MiniMe

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
Re: Amule remote connection init script
« Reply #15 on: June 07, 2005, 12:47:25 AM »

Quote
Originally posted by stefanero

hier mal einer: http://forum.amule.org/thread.php?threadid=5834

stefanero

 :D Nas ist ja mal was. Wenn der Thread mit mal nicht bekannt vorkommt. Klar, is ja auch mein eigener  :P

Aber trotzdem danke dass du dich der  Sache nochmal annimmst! Habs übrigens mittlerweile auch nicht rausgefunden warum er beim Systemstart nicht startet. Aber das macht auch nichts, ist zur Zeit eh nicht oft an und der Vorteil ist, dass ich so auch nicht automatisch den 12KB Upload hab. Hatte ganz vergessen dass man gar nciht verbunden sein muss zum uploaden...

cu
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Amule remote connection init script
« Reply #16 on: June 07, 2005, 02:04:53 AM »

ENGLISH FORUM
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: Amule remote connection init script
« Reply #17 on: June 07, 2005, 03:50:39 PM »

/me hides  :]
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Amule remote connection init script
« Reply #18 on: June 07, 2005, 04:56:45 PM »

Yeah, you better hide, moderator that doesn't follow the rules :P
Logged

raditzman

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: Amule remote connection init script
« Reply #19 on: June 11, 2005, 02:29:12 AM »

Here's what I did using amuled for a Ubuntu.

1 - created an 'amule' user, and configured amule (as that user) to accept external connections (using tcp, that was the only way I was successfull), put the password, configure anything else as amuled will use that configuration.

2-  put the following script executable (with "chmod 777 amuled") as /etc/init.d/amuled

This script runs amuled under user 'amule'!

Code: [Select]
#!/bin/sh
#
PATH=/bin:/usr/bin:/usr/local/bin/:/sbin/:/usr/sbin/
DAEMON=/usr/bin/amuled
USER=amule

case "$1" in
  start)
    echo -n "Starting aMule : amuled"
    export HOME=/home/amule/
    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 --chuid $USER --user $USER --exec $DAEMON
    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

3 - linked it to /etc/rc2.d/S80amuled (with "ln -s /etc/init.d/amuled /etc/rc2.d/S80amuled" )

4 - amuled starts automatically now. If I ever need to restart I do "sudo /etc/init.d/amuled restart", sudo "/etc/init.d/amuled" will return all possible actions.

It's amazing!!! I love amuled!!
Logged

OldFrog

  • Sr. Member
  • ****
  • Karma: 31
  • Offline Offline
  • Posts: 385
Re: Amule remote connection init script
« Reply #20 on: June 20, 2005, 12:52:47 AM »

For Mandrake/Mandriva, put the script in /etc/init.d. Then use chkconfig or mcc (System/services) to run the service in the desired boot options.

This xwill create the k**amuled alias in the /etc/rc.* directory and run them in the corresponding option.
« Last Edit: June 20, 2005, 12:53:07 AM by OldFrog »
Logged
Computer Science is no more about computers than astronomy is about telescopes (Edsger W. Dijkstra)

xit

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 50
Re: Amule remote connection init script
« Reply #21 on: June 20, 2005, 11:02:57 PM »

For chkconfig, just be sure that you have something like this at the begining of your script :

Code: [Select]
# chkconfig: 345 99 01
Where 345 are the runlevel where you want your script to be ran
99 is the position at startup and 01 at shutdown
Logged
Pages: 1 [2]