ralphlange / procServ

Wrapper to start arbitrary interactive commands in the background, with telnet or Unix domain socket access to stdin/stdout
GNU General Public License v3.0
23 stars 23 forks source link

Question about manage-procs syntax #46

Open JanSHUP opened 3 years ago

JanSHUP commented 3 years ago

Probably I misunderstood the documentation and got the syntax wrong using the manage-procs tool.

if I use e.g.: ./manage-procs add iocname /iocspath./st.cmd -P 20000

I get: Created symlink /home/pi/.config/systemd/user/multi-user.target.wants/procserv-iocname.service -> /home/pi/.config/procServ.d/procserv-iocname.service. Created symlink /home/pi/.config/systemd/user/procserv-iocname.service -> /home/pi/.config/procServ.d/procserv-iocname.service.

manage-procs --user start iocname

and the sytem file looks like:

[Unit] Description=procServ for iocname After=network.target remote-fs.target ConditionPathIsDirectory=/home/pi/Downloads/procServ

[Service] Type=simple ExecStart=None --user iocname RuntimeDirectory=procserv-iocname StandardOutput=syslog StandardError=inherit SyslogIdentifier=procserv-iocname

[Install] WantedBy=multi-user.target

somehow the positional argument "name" is okay, but everything later on is ignored. The service doesn't start due to lacking exec arguments. Maybe one can give me an example how to use the arguments in a correct way?

best regards, Jan

ralphlange commented 3 years ago

Sorry. I missed this issue.

ralphlange commented 3 years ago

Start of the procServ instances is done through another helper. Please refer to man manage-procs and manage-procs add -h for more detailed descriptions of the syntax.

E.g., if I run $ manage-procs --user add -C /tmp/foo -P 20000 myioc /home/ralph/bin/bla --blubb

I get the service file ~/.config/procServ.d/procserv-myioc.service as

[Unit]
Description=procServ for myioc
After=network.target remote-fs.target
ConditionPathIsDirectory=/tmp/foo

[Service]
Type=simple
ExecStart=/usr/local/bin/procServ-launcher --user myioc
RuntimeDirectory=procserv-myioc
StandardOutput=syslog
StandardError=inherit
SyslogIdentifier=procserv-myioc

[Install]
WantedBy=multi-user.target

And the procServ-launcher configuration ~/.config/procServ.d/myioc.conf as

[myioc]
command = /home/ralph/bin/bla --blubb
chdir = /tmp/foo
port = 20000