added service and deploy script

This commit is contained in:
2025-12-22 13:23:12 +01:00
parent e414307426
commit d7872ed620
3 changed files with 42 additions and 12 deletions

13
deploy.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
sudo mkdir -p /opt/upsmon
sudo python3 -m venv /opt/upsmon/venv
sudo /opt/upsmon/venv/bin/pip install paho-mqtt
sudo cp upsmon.py /opt/upsmon/
sudo cp upsmon.service /etc/systemd/system/upsmon.service
sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable upsmon.service
sudo systemctl start upsmon.service