aMule Forum

English => aMule Help => Topic started by: thedayofcondor on February 12, 2004, 06:49:38 AM

Title: Amuleweb in background?
Post by: thedayofcondor on February 12, 2004, 06:49:38 AM
There is a way to launch amuleweb in background?

If I send it in background, it stops because it's waiting for an (unusefull) text input (as I can only "exit" it).

If I call with:
amuleweb /dev/null

it (strangely) ask for the password (that's good anyway) then I can send it to background, where it keep writing "aMule[web]$" to /dev/null, wasting a lot of CPU time.

There is a "standard" way to modify this behaviour, or i must modify directly the sources?
Title: Re: Amuleweb in background?
Post by: Kry on February 12, 2004, 10:37:41 AM
we'll include a --quiet on 1.2.6 then.
Title: Re: Amuleweb in background?
Post by: thedayofcondor on February 12, 2004, 01:21:36 PM
Ok, for now I have changed in CamulewebApp::OnRun()

WebClientShell();

with:

while(true) sleep(10000);
Title: Re: Amuleweb in background?
Post by: bootstrap on February 12, 2004, 03:15:00 PM
Assuming you're using bash or a similar shell, try to start amuleweb and enter your password. When amuleweb is waiting for any input press ctrl-z to pause the app and then enter 'bg' at the prompt.
Now you should have amuleweb running in background. If you intend to leave the shell, dont kill it but leave with ctrl-d (logout) so that amuleweb will stay in the back.
If you need to get amuleweb back simply type fg.
I never tried to get a process in front that was spawned from another shell - i would recommend to keep the shell open after setting amuleweb in the background.
Title: Re: Amuleweb in background?
Post by: thedayofcondor on February 12, 2004, 08:30:50 PM
That is the first thing I've tried, but it doesn't work, as you can not not put in background a process that is waiting for input (it will go immediately to stopped status)

You can try with cat for example:

[root@server root]# cat &
[1] 14944
 
[1]+  Stopped                 cat

[root@server root]# bg

[1]+ cat &

[root@server root]#
 
[1]+  Stopped                 cat

[root@server root]#
Title: Re: Amuleweb in background?
Post by: arf on February 12, 2004, 09:31:51 PM
my 2 cents:
try with "screen" it's a very usefull (in my opionion ) app that emulate a terminal session. I use it very often when I must upgrade my linux box: I lunch a ssh session then the "screen" and finally I start the upgrade program. After that I can close the ssh  session and the day after I can simply run "screeen -r" to recover the session opened the day before.