For those that may want to save Domoticz stable/beta install files, as experience proves this may be useful as builds are not kept (most probably because this would need huge storage & have a cost), here is my small bash scripts that saves current install archives locally:
Code: Select all
#!/bin/bash
# Scripts that'll download all Domoticz install files for current stable or beta release.
# Editable settings, if base download URL or supported OS/ARCH change someday...
# Base URL can be checked in domoticz/update[beta|release].sh scripts.
DZ_DNLD_URL='https://www.domoticz.com/download.php?'
SYSTEMS='linux windows'
MACHINES='aarch64 armv7l x86_64 x86'
error()
{
echo $1
exit 1
}
usage()
{
echo "Usage : $0 [b|s] ; Download all Domoticz beta/stable install archives..."
exit 0
}
# Non foolproof args check:
[ $# -ne 1 ] && usage
case $1 in
b | B) channel='beta';;
s | S) channel='stable';;
*)
echo "Try better next time !"
usage;;
esac
# Create install archives save directory:
today=$(date +"%y%m%d")
dirTd=$channel'_'$today
mkdir $dirTd || error "Could not make directory : $dirTd"
echo "Getting files for $channel/$today -> $dirTd/ ..."
# Download channel archives for all machine/system combinations:
for machine in $MACHINES
do
for system in $SYSTEMS
do
dz_url="${DZ_DNLD_URL}channel=${channel}&type=release&system=${system}&machine=${machine}"
#echo "Download ${system}/${machine} from ${dz_url}..."
wget -4 -q -O $dirTd/domoticz_${channel}_${system}_${machine}.tgz --no-check-certificate ${dz_url}
[ $? -ne 0 ] && echo "No $channel file for ${system}/${machine}..." || echo "Done, ${channel} for ${system}/${machine} !"
done
done
# Remove zero-sized files that may result from non supported machine/system combinations...
find $dirTd -maxdepth 1 -size 0c -delete
echo "That's All Folks!!!"
exit 0
Code: Select all
chmod +x get_dz_installs.sh
Code: Select all
./get_dz_installs.sh s
(or)
./get_dz_installs.sh s
Code: Select all
$ tree stable_240116/
stable_240116/
├── domoticz_stable_linux_aarch64.tgz
├── domoticz_stable_linux_armv7l.tgz
├── domoticz_stable_linux_x86_64.tgz
└── domoticz_stable_windows_x86.tgz