Skip to content

Instantly share code, notes, and snippets.

@jonathanbarton
Last active July 23, 2016 23:41
Show Gist options
  • Save jonathanbarton/b04126152727e556dcea2be35d9b379e to your computer and use it in GitHub Desktop.
Save jonathanbarton/b04126152727e556dcea2be35d9b379e to your computer and use it in GitHub Desktop.
gomake-telemetry.service systemd script

Create service config file:

sudo nano /lib/systemd/system/gomake-telemetry.service

/lib/systemd/system/gomake-telemetry.service contents:

[Unit]
Description=goMake Telemetry Service
After=multi-user.target

[Service]
Type=idle
ExecStart=/usr/bin/python /opt/gomake-telemetry/
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Set run permissions of service:

sudo chmod 644 /lib/systemd/system/gomake-telemetry.service

Enable service:

sudo systemctl daemon-reload
sudo systemctl enable gomake-telemetry.service

Reboot to take effect:

sudo reboot

Systemd Reference: link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment