<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Stephen,</p>
    <p>You are missing the <b>RuntimeDirectory</b> statement from the
      system file.</p>
    <p>/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.</p>
    <p>Using <b>RuntimeDirectory</b> 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.<br>
    </p>
    <p>The correct syntax and included with your script is as follows...</p>
    <p><font size="-1" face="monospace">[Unit]<br>
        Description=dxcluster service<br>
        <br>
        [Service]<br>
        RuntimeDirectory=dxspider<br>
        PIDFile=/var/run/dxspider/dxspider.pid<br>
        Type=simple<br>
        Environment=TERM=linux<br>
        User=sysop<br>
        TTYPath=/dev/tty8<br>
        ExecStart=/bin/sh -c "/usr/bin/perl -w /spider/perl/cluster.pl"
        sysop > /dev/tty7 < /dev/tty8<br>
        ExecStartPost=/bin/sh -c 'umask 022; pgrep perl >
        /var/run/dxspider/dxspider.pid'<br>
        ExecStop=/usr/bin/kill -s QUIT $MAINPID<br>
        Restart=always<br>
        RestartSec=0<br>
        TTYReset=yes<br>
        TTYVHangup=yes<br>
        TTYVTDisallocate=yes<br>
        KillSignal=SIGHUP<br>
        <br>
        [Install]<br>
        WantedBy=multi-user.target<br>
      </font><br>
    </p>
    <p>cheers</p>
    <p>Tim<br>
    </p>
    <p>-- </p>
    <pre class="moz-signature" cols="72">VK2XAX : QF56if : ITU59 : CQ30 : BMARC : WIA</pre>
  </body>
</html>