You are not logged in.

#1 2012-12-13 19:07:36

dandaman0061
Member
From: Boise, ID
Registered: 2009-05-06
Posts: 12

[solved] Writing systemd service file - forking no pidfile

Hey all,

I am trying to write .service files for TORQUE, but am having some difficulty and quite can't understand the docs.  Here's what I have so far for the server

[Unit]
Description=TORQUE server
Wants=basic.target
After=basic.target network.target

[Service]
Type=forking
PIDFile=/run/torque-server.pid
ExecStart=/usr/sbin/pbs_server

[Install]
WantedBy=multi-user.target

The problem I'm having is with the PIDFile - pbs_server doesn't provide an option (as far as I can see) to specify a pid file... is this something that systemd can generate on its own, or what's the normal solution here?

Without the PIDFile specified systemctl start returns immediately and no process exists, with the PIDFile systemctl start stalls for a while and then has an error saying it couldn't find the pid file (surprise), but pbs_server is left running.

Thanks for any help

Last edited by dandaman0061 (2012-12-13 19:58:36)

Offline

#2 2012-12-13 19:58:24

dandaman0061
Member
From: Boise, ID
Registered: 2009-05-06
Posts: 12

Re: [solved] Writing systemd service file - forking no pidfile

Nevermind - it appears that pbs_server creates a pid file at $TORQUE_HOME/server_priv/server.lock where using torque from the AUR is /var/spool/torque

Chaging the pidfile setting in the service file to this now works.

Offline

Board footer

Powered by FluxBB