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 #!/bin/bash
VERSIONINFO="2602003" VERSIONINFO="2603002"
echo "Version $VERSIONINFO" echo "Version $VERSIONINFO"
if [ -z "$1" ] if [ -z "$1" ]

View File

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

View File

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

View File

@@ -368,10 +368,6 @@ def ups_check(readq):
else: else:
#icontitle = str(device_battery)+"%"+" Left" #icontitle = str(device_battery)+"%"+" Left"
statusstr = "Battery" 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+"discharge_"+str(device_battery)
tmpiconfile = tmpiconfile + ".png" tmpiconfile = tmpiconfile + ".png"