You are not logged in.

#1 2012-09-06 20:39:48

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Foldingathome-smp from AUR not friend with systemd

So I downloaded and compiled Folding@home-smp and everything went fine, until I realized that it don't provide a service file, or whatever you want to call it.

But not matter, I tried to make my own, and failed miserably. Then again, I ended up more or less just deleting the lines in the provided script, that wouldn't work due to a missing rc.conf and whatnot.

So in short, it got the better of me and not the question is if anyone has succeeded.

If so, I'd very much like to hear about it and possible get instructions.


Best regards.


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#2 2012-09-06 23:50:13

adamrehard
Member
From: NY, USA
Registered: 2011-11-03
Posts: 154

Re: Foldingathome-smp from AUR not friend with systemd

http://foldingforum.org/viewtopic.php?f … 2&start=90

This should work. Look in post 3.
adam


"The box said requires Vista or better, so I installed Arch"
Windows != Linux

Offline

#3 2012-09-07 09:21:34

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Foldingathome-smp from AUR not friend with systemd

Thanks. I'll take a look at it when I come home.


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#4 2012-09-07 14:07:24

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Foldingathome-smp from AUR not friend with systemd

adamrehard wrote:

http://foldingforum.org/viewtopic.php?f … 2&start=90

This should work. Look in post 3.
adam

After further consideration I don't get it.

There are still references to /etc/rc.conf and /etc/rc.d/functions, neither of which exists anymore. Nor is it clear which part of post #3 you think will solve the problem.

I've copied the service and intent to alter it accordingly, but that is hardly enough when the foldingathome-smp daemon don't work.


I do appreciate your attempt, but I'm afraid it doesn't solve my problem.


Best regards


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#5 2012-09-08 12:23:37

zacariaz
Member
From: Denmark
Registered: 2012-01-18
Posts: 539

Re: Foldingathome-smp from AUR not friend with systemd

Never mind my last post. I was a bit confused.

Regardless I still can't get a service to work, though I am perfectly able to run manually.

It may be that I don't actually need this service after all, as I may have another method in mind, but still, I'd like to know why I can't get it to work.

This is what I've ended up with after much experimentation.

[Unit]
Description=Folding@home distributed computing client
Requires= nscd.service
After=network.target nscd.service

[Service]
Type=simple
WorkingDirectory=/home/zacariaz
User=zacariaz
Group=zacariaz
ExecStart=/opt/fah-smp/fah6 -smp -forceasm

[Install]
WantedBy=multi-user.target

Apparently nscd.service is not required after all, but it's really the same difference.

All would it be possible to pipe the output of a process like this to a specific tty?

something like:

/opt/fah-smp/fah6 -smp -verbosity 9 -forceasm &> /dev/tty6

without login in first of course.

Last edited by zacariaz (2012-09-08 12:38:25)


I am a philosopher, of sorts, not a troll or an imbecile.
My apologies that this is not always obvious, despite my best efforts.

Offline

#6 2012-09-29 18:25:13

xrchz
Member
Registered: 2009-04-03
Posts: 37

Re: Foldingathome-smp from AUR not friend with systemd

I had success with a simple unit file (almost the same as yours), which I have posted as a comment on the AUR package.

https://aur.archlinux.org/packages.php?ID=11964

Copied here:

Here is a systemd unit for this daemon.

It should go to `/usr/lib/systemd/system/foldingathome-smp.service'.
Please add it to the package.

If using systemd, the configuration file, `/etc/conf.d/foldingathome-smp' becomes redundant, and users should copy the service file to `/etc/systemd/system/multi-user.target.wants/foldingathome-smp.service' and edit it directly to configure their username, group, working directory, priority, and command line options. (Or just enable the service to have it symlinked to /etc/... and get the default config.)
In particular, the variables in [Service] of interest for configuration are: WorkingDir, User, Group, and ExecStart. (User and Group are omitted below to give root:root (or whatever systemd was started as) defaults.)
Users should make sure the working directory contains client.cfg, etc., and note that logs are sent to journalctl now rather than myfah.log.

Service file follows

[Unit]
Description=Folding@home distributed computing client
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/fah-smp
ExecStart=/opt/fah-smp/fah6 -smp -verbosity 9 -forceasm

[Install]
WantedBy=multi-user.target

I'm not sure why yours didn't work. (What didn't work?)

As for piping the output... you can probably set something in the unit file to change it, but by default the output goes to journalctl so you can see it there.

By the way, I personally edited the service file's [Service] section to look like this:

[Service]
Type=simple
WorkingDirectory=/opt/fah-smp/ramana
User=ramana
ExecStart=/opt/fah-smp/fah6 -smp -verbosity 9 -forceasm

Offline

Board footer

Powered by FluxBB