- Forum
- Software discussions
- pyradmon
- How to run pyradmon.py in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online
How to run pyradmon.py in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online
5 years 6 months ago - 5 years 6 months ago #4417
by Marc
Marc PC1MH
How to run pyradmon.py in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online was created by Marc
pyradmon.py 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:To get the script running in Systemd do the following:
Create a file called "radmon.service" in /etc/systemd/system .Then do:
And if needed do:
That's it.
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 pyradmon.py
sudo apt-get install python-serial
sudo adduser yourusername dialout
sudo reboot
Create a file called "radmon.service" in /etc/systemd/system .
[Unit]
Description=Radmon service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=30
User=marc
ExecStart=/usr/bin/python -u /home/marc/GMC/pyradmon.py
StandardOutput=console
StandardError=inherit
[Install]
WantedBy=multi-user.target
sudo systemctl enable radmon.service
sudo systemctl start radmon.service
sudo systemctl status radmon.service
sudo systemctl restart radmon.service
sudo systemctl stop radmon.service
That's it.
Marc PC1MH
Last edit: 5 years 6 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.
5 years 5 months ago #4422
by mw0uzo
Replied by mw0uzo on topic How to run pyradmon.py in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online
That's great information, thank you for posting!
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
- Forum
- Software discussions
- pyradmon
- How to run pyradmon.py in Systemd on Ubuntu 18.04.2-LTS to get GQ GMC-320 online
Time to create page: 0.126 seconds