systemd service
This commit is contained in:
parent
084ec7df27
commit
6aa3563cad
14
README.md
14
README.md
|
@ -0,0 +1,14 @@
|
|||
# to install required dependencies
|
||||
```pip install -r requirements.txt```
|
||||
|
||||
# to run the telegram bot and listen for commands
|
||||
```python3 moonlight_analytics.py```
|
||||
|
||||
# to run the nightly iperf test
|
||||
```python3 nightly_test.py```
|
||||
|
||||
# to install a systemd service file for the telegram bot
|
||||
- update moonlight_analytics.service with correct paths
|
||||
- cp moonlight_analytics.service /etc/systemd/system/
|
||||
- sudo systemctl enable moonlight_analytics.service
|
||||
- systemctl status moonlight_analytics.service (to see it running)
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=moonlight-analytics-telegram-bot
|
||||
|
||||
Wants=network.target
|
||||
After=syslog.target network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="PATH=/datadrive/apps/moonlight_analytics/cowmesh-network-test/moonlight/bin/"
|
||||
ExecStart=/datadrive/apps/moonlight_analytics/cowmesh-network-test/moonlight/bin/python /datadrive/apps/moonlight_analytics/cowmesh-network-test/moonlight_analytics.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue