-
Notifications
You must be signed in to change notification settings - Fork 1
/
mqttsysteminfo.service.gx100
34 lines (28 loc) · 935 Bytes
/
mqttsysteminfo.service.gx100
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[Unit]
Description=MQTT System Information
After=syslog.target
[Service]
Type=simple
User=pconroy
Group=pconroy
WorkingDirectory=/home/pconroy/MQTTSystemInfo
ExecStart=/usr/bin/python3 /home/pconroy/MQTTSystemInfo/Main.py gx100.local
StandardOutput=null
StandardError=null
Restart=always
RestartSec=60
[Install]
WantedBy=default.target
#
# After this the steps are:
# Create the unit file in /etc/systemd/system (the file name before .service will be the name you call to start/stop/restart the service)
# Set file permissions to 644
# Tell systemd that there is a new unit file: systemctl daemon-reload
# Start service: systemctl start <service>
# Check the service status: systemctl status <service>
###
# sudo cp mqttsysteminfo.service /etc/systemd/system/.
# sudo chmod 644 /etc/systemd/system/mqttsysteminfo.service
# sudo systemctl daemon-reload
# sudo systemctl start mqttsysteminfo
# sudo systemctl status mqttsysteminfo