Any executable script or program can be run as a service, all you need is a xxx.service file in /etc/systemd/system then enable that with sudo systemctl enable xxx.service and start it with sudo systemctl start xxx.service.Can a script run as a service on Linux?
Code:
[Unit]Description=Glow gas readingsWants=network.target[Service]ExecStart=/usr/local/bin/glowShortStandardOutput=syslogStandardError=syslogSyslogIdentifier=glowgasRestart=alwaysRestartSec=5RuntimeMaxSec=86400[Install]WantedBy=multi-user.target
Statistics: Posted by DougieLawson — Thu Jun 13, 2024 10:39 pm