aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Problems to auto-start amuled and amuleweb  (Read 5680 times)

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Problems to auto-start amuled and amuleweb
« on: July 22, 2005, 11:48:28 PM »

Hello all!
I've installed amule and it works, but there are some "problems" that I'd like to solve, but I just don't have any idea of how to do that...

First of all, let me tell you the problem:
I don't have GUI in the computer where I installed amule and I don't want to install any GUI, cuz the computer is kinda old. So, the tutorial with VNC is not possible for me.
I don't have access anymore to it's keyboard, so I have to do everything in it by SSH. But, everything is working out fine.
The problem is that, to start amule, I must login twice with a user I've created just to run amule. Once for the daemon "amuled" and the other for the "amuleweb".
I start them both and it works, I can access the web interface, download files and everything. But, I can do that just as long as the SSH connections are up. If i shut down the window, it stops working and I can't access it with the browser anymore.

So, what I want to do is start amuled and amuleweb automaticaly with the Slackware boot, just like it works with the other daemons, like Apache or Samba.

But, the first problem is that both amuled and amuleweb "hangs" (doesn't free the command line) just after they start (that's also why i need 2 SSH connections). Is there a way to start them like "real" daemons?

The other problem is that I must start them both with another user. I've got to start them with that user I've created so that I can access the downloaded files from the other computers via SAMBA.

Can anyone help me on this?!
Thanks ;)

Rafael Scudelari
scudelari@gmail.com
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: Problems to auto-start amuled and amuleweb
« Reply #1 on: July 23, 2005, 03:06:07 AM »

Two things: you can have amuled launch amuleweb itself, so you don't need to have that second ssh session.

Also, check out the -f (--full-daemon) switch to amuled.
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: Problems to auto-start amuled and amuleweb
« Reply #2 on: July 23, 2005, 03:30:28 AM »

There are various ways to work around this. The one I like most is to use the program "screen".

You open a ssh conection and then start screen. screen is a terminal emulatorfrom which you can disconnect and reconnect to it, so the programs in it won't stop if you get disconnected. You can even create multiple sessions inside one screen betwen which you can switch (one for amuled, one for amuleweb, etc...). Take a look at the man page, if you have any more questions about it ask here.
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

PsychoChris

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
Re: Problems to auto-start amuled and amuleweb
« Reply #3 on: July 23, 2005, 05:55:41 AM »

I agree to ken. So you don't need another program and no second session. You have to adjust amule.conf to start amuleweb by its own. Go to the [WebServer] section and set Enabled to 1. Adjust the port and set a password if needed. Then just start amuled with the option -f and amuled will fork to the background so you can close your connection without amuled or amuleweb beeing closed.

Greetings,
Chris
Logged

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
RE: Problems to auto-start amuled and amuleweb
« Reply #4 on: July 23, 2005, 06:19:45 PM »

Thanks for the help.
I've managed to launch amuleweb with amuled.
But, how can I launch it with another user at the system boot?
In other words, what line do I have to add to the rc.locals file to launch it using a desired user?
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: Problems to auto-start amuled and amuleweb
« Reply #5 on: July 23, 2005, 06:38:33 PM »

there are a couple of init scripts in this forum...

just try the search function... ;)
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."

scudelari

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
Re: Problems to auto-start amuled and amuleweb
« Reply #6 on: July 23, 2005, 07:02:29 PM »

I've made that search and I've seen some init scripts, but those just seemed too crazy for me. ;)
I was looking for something not too complicated...

Anyway, this line seems to do the job:

su - username_to_launch_amuled -c amuled -f &

I added it to the rc.locals files located at /etc/rc.d
I've also changed amule.conf like PsychoChris said.

The problem is that now amuled keeps sending annoying messages to the command prompt. Is there anyway to prevent that from happening?

Thanks everyone ;)
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Problems to auto-start amuled and amuleweb
« Reply #7 on: July 24, 2005, 12:23:27 PM »

Code: [Select]
su -c /path/to/amuled -f >/path/to/amuled_console_log 2>&1 &
Logged
concordia cum veritate