Hello !
Domoticz user since 2016, I have it running in a Docker container on a RPi.
Nothing too fancy, but I'm planning on bringing a little more automation in the process, and with that in mind, I'd like to build my Docker images with the revision as the tag.
I know that I can get the revision from the json found at json.htm?type=command¶m=checkforupdate, but is there a way to fetch the current revision number elsewhere, like if my domoticz isn't running anymore ?
Many thanks in advance for the answers
Fetching current Domoticz revision number
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Fetching current Domoticz revision number
Not a very elegant way but it worksAurum wrote: ↑Tuesday 05 February 2019 13:21 Hello !
Domoticz user since 2016, I have it running in a Docker container on a RPi.
Nothing too fancy, but I'm planning on bringing a little more automation in the process, and with that in mind, I'd like to build my Docker images with the revision as the tag.
I know that I can get the revision from the json found at json.htm?type=command¶m=checkforupdate, but is there a way to fetch the current revision number elsewhere, like if my domoticz isn't running anymore ?
Many thanks in advance for the answers
Code: Select all
#!/bin/sh
# This script can be used get current revison
lowercase(){
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
}
OS=`lowercase \`uname -s\``
MACH=`uname -m`
if [ ${MACH} = "armv6l" ]
then
MACH="armv7l"
fi
#echo "Downloading tgz"
#echo "Please Standby..."
mkdir tempDomoticz
cd tempDomoticz
wget -q -O domoticz_beta.tgz --no-check-certificate "https://www.domoticz.com/download.php?channel=beta&type=release&system=${OS}&machine=${MACH}"
tar xfz domoticz_beta.tgz domoticz
rm domoticz_beta.tgz
./domoticz --version | grep Giz
newDomoticzVersion=$(./domoticz --version 2> /dev/null | grep Giz | awk -F "Domoticz V" {'print substr($2,0,7)'})
echo $newDomoticzVersion
cd ..
rm -r tempDomoticz
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Fetching current Domoticz revision number
Not elegant, truly
I'll try that, thank you !
I'll try that, thank you !
Who is online
Users browsing this forum: No registered users and 0 guests