Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.