Skip to content

Instantly share code, notes, and snippets.

@fearless-spider
Created December 30, 2022 18:04
Show Gist options
  • Save fearless-spider/592e99fa7cca924f9a7a24805730a68c to your computer and use it in GitHub Desktop.
Save fearless-spider/592e99fa7cca924f9a7a24805730a68c to your computer and use it in GitHub Desktop.
You must use a system's de service unit. Locate it in /etc/systemd/system.
Example:
/etc/systemd/system/ana-server.service
[Unit]
Description=Servidor TCP/IP-Serie para la comunicacion con los sensores del Arduino
After=syslog.target network.target
[Service]
ExecStart=/usr/share/analog/analogArduinoServer.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Try first with
systemctl daemon-reload
systemctl start ana-server.service
If it works, do the next to it start at boot:
systemctl enable ana-server.service
@fearless-spider
Copy link
Author

For my waterforce360

[Unit]
Description=Service to control 360 waterforce
After=syslog.target network.target
[Service]
ExecStart=/home/f3ar13ss/Code/Python/python_playground/waterforce360.py
Restart=on-abort
[Install]
WantedBy=multi-user.target

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