Automated Change by GitHub Action

This commit is contained in:
okunze
2026-03-27 21:24:09 +00:00
committed by github-actions[bot]
parent 57498e55cd
commit a7203e0777
4 changed files with 16 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
VERSIONINFO="2602003"
VERSIONINFO="2603002"
echo "Version $VERSIONINFO"
if [ -z "$1" ]

View File

@@ -58,6 +58,12 @@ rtcdaemonscript=$INSTALLATIONFOLDER/$rtcdaemonname.py
requireinstall=0
newmode=0
if [ ! -z "$1" ]
then
requireinstall=1
newmode=3 # installation
fi
echo "-----------------------------------"
echo " Argon Industria UPS Configuration"
echo "-----------------------------------"
@@ -113,7 +119,8 @@ UPSCMDFILE="/dev/shm/upscmd.txt"
UPSSTATUSFILE="/dev/shm/upslog.txt"
rtcconfigscript=$INSTALLATIONFOLDER/argonups-rtcconfig.sh
if [ -f "$UPSSTATUSFILE" ]
if [ -f "$UPSSTATUSFILE" ] && [ -f "$rtcconfigscript" ]
then
# cat $UPSSTATUSFILE
sudo $pythonbin $rtcdaemonscript GETBATTERY
@@ -277,8 +284,12 @@ do
sudo systemctl restart "$rtcdaemonname.service"
loopflag=0
fi
# Serial I/O is here
sudo systemctl restart argononed.service
if [ ! -z "$1" ]
then
# Called from setup script
loopflag=0
fi
elif [ $newmode -eq 4 ]
then
sudo systemctl stop "$daemonname.service"

View File

@@ -93,7 +93,7 @@ try:
if prevnotifymsg != curnotifymsg:
notifymessage(curnotifymsg, curnotifycritical)
if tmp_battery <= 5 and tmp_charging != 0:
if tmp_battery <= 5 and tmp_charging == 0:
os.system("shutdown +1 """+curnotifymsg+".""")
prevnotifymsg = curnotifymsg

View File

@@ -368,10 +368,6 @@ def ups_check(readq):
else:
#icontitle = str(device_battery)+"%"+" Left"
statusstr = "Battery"
tmp_battery = round(tmp_battery/20)
if tmp_battery > 4:
tmp_battery = 4
#tmpiconfile = tmpiconfile+"battery_"+str(tmp_battery)
tmpiconfile = tmpiconfile+"discharge_"+str(device_battery)
tmpiconfile = tmpiconfile + ".png"