autoupdate.yml aktualisiert

This commit is contained in:
olli 2023-07-18 14:16:43 +02:00
parent 7febde5713
commit 6bbd476473

View File

@ -24,6 +24,7 @@
g_nice g_nice
g_lockfile g_lockfile
g_all-to-syslog g_all-to-syslog
DISPLAY=""
set -o pipefail set -o pipefail
for update in $(find /usr/local/sbin/autoupdate.d -name "*.update" -type f | sort) for update in $(find /usr/local/sbin/autoupdate.d -name "*.update" -type f | sort)
do do
@ -94,7 +95,7 @@
mac=$(ip addr show $(ip route list | grep default | cut -d" " -f5) | grep "link/ether " | perl -pe 's/.*link\/ether //; s/:/-/g' | cut -d" " -f1) mac=$(ip addr show $(ip route list | grep default | cut -d" " -f5) | grep "link/ether " | perl -pe 's/.*link\/ether //; s/:/-/g' | cut -d" " -f1)
usr=$(getent passwd 1000 | cut -d: -f1) usr=$(getent passwd 1000 | cut -d: -f1)
hst=$(hostname | cut -d. -f1 | perl -pe 's/ //g') hst=$(hostname | cut -d. -f1 | perl -pe 's/ //g')
curl https://update.$(domainname -f)/${mac}--${usr}--${hst}.sh >${g_tmp}/update.sh curl -s https://update.$(domainname -f)/${mac}--${usr}--${hst}.sh >${g_tmp}/update.sh
head -n1 ${g_tmp}/update.sh | grep -q "^#!/bin/bash" && bash ${g_tmp}/update.sh head -n1 ${g_tmp}/update.sh | grep -q "^#!/bin/bash" && bash ${g_tmp}/update.sh
fi fi
backup: yes backup: yes