[Dxspider-support] dxspider and systemd
Tim Tuck
vk2xax at skybase.net
Tue Nov 2 00:33:40 GMT 2021
Hi Stephen,
You are missing the *RuntimeDirectory* statement from the system file.
/var/run is ephemeral and directories are created there either through
system service files or by systemd and conf files and purged when the
system is rebooted so the current /var/run/dxspider directory would go
away on reboot.
Using *RuntimeDirectory* as part of the system file will ensure that
systemd creates the /var/run/dxspider directory with the correct
permissions on every boot of the system or run of the service.
The correct syntax and included with your script is as follows...
[Unit]
Description=dxcluster service
[Service]
RuntimeDirectory=dxspider
PIDFile=/var/run/dxspider/dxspider.pid
Type=simple
Environment=TERM=linux
User=sysop
TTYPath=/dev/tty8
ExecStart=/bin/sh -c "/usr/bin/perl -w /spider/perl/cluster.pl" sysop >
/dev/tty7 < /dev/tty8
ExecStartPost=/bin/sh -c 'umask 022; pgrep perl >
/var/run/dxspider/dxspider.pid'
ExecStop=/usr/bin/kill -s QUIT $MAINPID
Restart=always
RestartSec=0
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillSignal=SIGHUP
[Install]
WantedBy=multi-user.target
cheers
Tim
--
VK2XAX : QF56if : ITU59 : CQ30 : BMARC : WIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20211102/510dbac3/attachment.htm>
More information about the Dxspider-support
mailing list