Fix service deployment

This commit is contained in:
Odd Stråbø 2024-01-03 11:28:33 +01:00
parent b4e8258de1
commit 1890036b6c
3 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,5 @@
#!/bin/bash
rsync --exclude=.git --exclude='packet format.java' --exclude-from=.gitignore -ravC . pi@solarpi:ble
ssh pi@solarpi 'systemctl --user daemon-reload; systemctl --user restart solarmppt'
ssh pi@solarpi './ble-venv/bin/pip install -r ble/requirements.txt'
ssh pi@solarpi 'ln -fs $(pwd)/ble/solarmppt.service ~/.config/systemd/user/solarmppt.service'
ssh pi@solarpi 'loginctl enable-linger; systemctl --user daemon-reload; systemctl --user restart solarmppt'

View File

@ -4,5 +4,6 @@ bluepy
libscrc
paho-mqtt
pyserial
graypy
types-PyYAML

View File

@ -4,8 +4,8 @@ Description=Daemon for bridging a Serial SRNE MPPT charge controller to MQTT
[Service]
Type=exec
Restart=on-failure
StandardOutput=append:/home/pi/z_solar_systemd.log
StandardError=append:/home/pi/z_solar_systemd.log
#StandardOutput=append:/home/pi/z_solar_systemd.log
#StandardError=append:/home/pi/z_solar_systemd_err.log
WorkingDirectory=/home/pi/
Environment=PYTHONPATH=/home/pi/ble/
ExecStart=/home/pi/ble-venv/bin/python -m srnemqtt