Skip to content

Instantly share code, notes, and snippets.

@jkbryan
Created October 2, 2018 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkbryan/c2c23e4dee78c7013a5faaf053bc98af to your computer and use it in GitHub Desktop.
Save jkbryan/c2c23e4dee78c7013a5faaf053bc98af to your computer and use it in GitHub Desktop.
auto-start-cpu.py-on-boot.txt
nano /etc/systemd/system/cpu-py.service
Add:
[Unit]
Description=cpu piglow python script
After=syslog.target network.target
[Service]
ExecStart=/usr/bin/python /usr/share/piglow/cpu.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Save: Ctrl o, then Exit: Ctrl x
systemctl daemon-reload
systemctl start cpu-py.service
Does it work? If yes, then:
systemctl enable cpu-py.service
Reboot - script should start automatically!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment