autoupdate.yml aktualisiert

This commit is contained in:
olli 2023-07-19 14:11:36 +02:00
parent 27c2cb4b40
commit 5b4ba81af7

View File

@ -112,7 +112,8 @@
updatesrv="update.$(domainname -d)" updatesrv="update.$(domainname -d)"
if host ${updatesrv} >/dev/null 2>&1 if host ${updatesrv} >/dev/null 2>&1
then then
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) [ -s /etc/mymac ] || ip addr show $(ip route list | grep default | cut -d" " -f5) | grep "link/ether " | perl -pe 's/.*link\/ether //; s/:/-/g' | cut -d" " -f1 >/etc/mymac
mac=$(cat /etc/mymac)
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 -s 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