How to run in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online

4 years 9 months ago - 4 years 9 months ago #4417 by Marc is a little python script I need running on an Ubuntu 18.04.2-LTS server to get data from my GMC 320 Geiger Muller counter from GQ electronics to its data showing webpage here on radmon.
It has to always run and restarted if it fails.
On Ubuntu 18 and many other systems a system called Systemd is in use to facilitate this.
To install the script:
sudo chmod +x 
sudo apt-get install python-serial
sudo adduser yourusername dialout
sudo reboot
To get the script running in Systemd do the following:

Create a file called "radmon.service" in /etc/systemd/system .
Description=Radmon service

ExecStart=/usr/bin/python -u /home/marc/GMC/

Then do:
sudo systemctl enable radmon.service
sudo systemctl start radmon.service
And if needed do:
sudo systemctl status radmon.service
sudo systemctl restart radmon.service
sudo systemctl stop radmon.service

That's it.

Marc PC1MH
Last edit: 4 years 9 months ago by Marc. Reason: Error repaired
The following user(s) said Thank You: mw0uzo

Please Log in or Create an account to join the conversation.

4 years 9 months ago #4422 by mw0uzo
That's great information, thank you for posting!

Please Log in or Create an account to join the conversation.

Moderators: Gamma-Man
Time to create page: 0.120 seconds
Powered by Kunena Forum
Everything's free. Please support us by considering a donation. Log in first!
Solar powered Raspberry Pi 4 server stats: CPU 26% Memory 15% Swap 1% CPU temp=57.4'C Uptime 1 Days