[Unit] Description=QualTest GSM node ConditionPathExists=ABSOLUTE_INSTALL_DIR/run_node.sh After=network.target [Service] Type=simple User=pi Group=pi LimitNOFILE=1024 Restart=always RestartSec=30 # startLimitIntervalSec=60 WorkingDirectory=ABSOLUTE_INSTALL_DIR ExecStart=/bin/bash ABSOLUTE_INSTALL_DIR/run_node.sh --check-pid-file KillSignal=SIGQUIT # make sure log directory exists and owned by syslog PermissionsStartOnly=true ExecStartPre=/usr/bin/rm -f ABSOLUTE_INSTALL_DIR/qualtest.pid #ExecStartPre=/bin/chown syslog:adm /var/log/sleepservice #ExecStartPre=/bin/chmod 755 /var/log/sleepservice StandardOutput=syslog StandardError=syslog SyslogIdentifier=agent_gsm [Install] WantedBy=multi-user.target