diff --git a/README.md b/README.md index e69de29..090710a 100644 --- a/README.md +++ b/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) \ No newline at end of file diff --git a/moonlight_analytics.service b/moonlight_analytics.service new file mode 100644 index 0000000..f600e99 --- /dev/null +++ b/moonlight_analytics.service @@ -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