aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Amuleweb in background?  (Read 4025 times)

thedayofcondor

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • http://natmonitor.sourceforge.net
Amuleweb in background?
« 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?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Amuleweb in background?
« Reply #1 on: February 12, 2004, 10:37:41 AM »

we'll include a --quiet on 1.2.6 then.
Logged

thedayofcondor

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • http://natmonitor.sourceforge.net
Re: Amuleweb in background?
« Reply #2 on: February 12, 2004, 01:21:36 PM »

Ok, for now I have changed in CamulewebApp::OnRun()

WebClientShell();

with:

while(true) sleep(10000);
« Last Edit: February 12, 2004, 01:22:01 PM by thedayofcondor »
Logged

bootstrap

  • Guest
Re: Amuleweb in background?
« Reply #3 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.
Logged

thedayofcondor

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • http://natmonitor.sourceforge.net
Re: Amuleweb in background?
« Reply #4 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]#
Logged

arf

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 76
Re: Amuleweb in background?
« Reply #5 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.
Logged