mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-28 02:06:04 +02:00
Create 00-batch_updater.sh
This commit is contained in:
17
.templates/00-batch_updater.sh
Normal file
17
.templates/00-batch_updater.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
# ==============================================================================
|
||||||
|
# Ensures all scripts are up-to-date
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
if [ -d /etc/cont-init.d ]; then
|
||||||
|
# Check if downloads possible
|
||||||
|
wget -NS https://example.com/ &>/dev/null || exit 0
|
||||||
|
|
||||||
|
# Check scripts
|
||||||
|
cd /etc/cont-init.d || true
|
||||||
|
for scripts in *; do
|
||||||
|
# If newer file, download to directory
|
||||||
|
wget -NS --content-disposition "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" &>/dev/null || true
|
||||||
|
done
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user