Page 1 of 1
change to not run as service
Posted: Sat Nov 30, 2013 2:39 pm
by tmillic
Hello,
I made the mistake of setting folding at home to run as a service during installation. I would just let it finish a work unit completely, then re-install with the correct setting, but the following command isn't working:
Code: Select all
tom@quartet:~$ sudo /etc/init.d/FAHClient start -- finish
Starting fahclient ... FAIL
tom@quartet:~$
Is there a way to either get the option to stop at the end of the work unit to work, or to change the options of whether to start as a service or not?
Thanks.
Re: change to not run as service
Posted: Sat Nov 30, 2013 2:59 pm
by bollix47
If you have FAHControl installed you can right click on the slot and select Finish.
There is also a max-units config option:
Code: Select all
max-units <integer=0> Process at most this number of units, then pause.
To stop the service (i.e. FAHClient) type: sudo /etc/init.d/FAHClient stop
To remove the service type: sudo update-rc.d -f FAHClient remove
Re: change to not run as service
Posted: Sat Nov 30, 2013 3:00 pm
by 7im
To offer the best alternative, please explain why the service install is not working, and if not starting the client as a service, do you plan to start it manually each time?
Re: change to not run as service
Posted: Sat Nov 30, 2013 4:12 pm
by tmillic
The service install does work, but I'd like to have the computer's resources for other things from time to time and would like to be able to let it complete a unit and stop before I intend to use it for other things. I would like to start it manually each time as well, so that it won't start and download a work unit that it won't be able to finish before being given other tasks (by me).
I don't have fahcontrol installed. There is no desktop environment at all installed for a gui program like fahcontrol.
Re: change to not run as service
Posted: Sat Nov 30, 2013 4:15 pm
by calxalot
You could leave the service install alone, and just set to not start the service at boot:
Create file /etc/default/fahclient with one line:
You can then manually start and stop the service with the usual commands.
If you need to start the service with extra args passed to the client, you need to use '--'. eg
Code: Select all
sudo /etc/init.d/FAHClient start -- --finish
You can also start without options, and use
But it is probably better to just use FAHControl (which you can use remotely).
Edit: you might also want to add pause-on-start true to the client config.xml
Edit2: note that if you use --finish, the client will exit after uploading but the client will immediately respawn and get more work if you don't have pause-on-start. (because service starts client with --daemon)
Re: change to not run as service
Posted: Sat Nov 30, 2013 4:24 pm
by tmillic
Thanks!
It looks like I had that command wrong by not having 2 sets of dashes. (Why 2?)
Re: change to not run as service
Posted: Sat Nov 30, 2013 4:27 pm
by calxalot
Two dashes is the standard for longopts. The first two dashes mark end of options for the start script, so anything else is passed to the client.
Re: change to not run as service
Posted: Sat Nov 30, 2013 4:30 pm
by calxalot
If you use ENABLE=false, you will need to start the service with
Code: Select all
sudo /etc/init.d/FAHClient force-start
Re: change to not run as service
Posted: Sat Nov 30, 2013 5:57 pm
by bruce
tmillic wrote: the following command isn't working:
Code: Select all
tom@quartet:~$ sudo /etc/init.d/FAHClient start -- finish
Starting fahclient ... FAIL
tom@quartet:~$
I'm not a linux guru so don't shoot me if I' wrong. Shouldn't that be
sudo /etc/init.d/FAHClient start --finish
(no space before finish).
... or maybe
FAHClient --send-command finish
(which doesn't need the sudo).
Re: change to not run as service
Posted: Sat Nov 30, 2013 8:16 pm
by 7im
Yep.