From 5b4ba81af7a11ad3dc71373953cb30cd9d1a2f6c Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 19 Jul 2023 14:11:36 +0200 Subject: [PATCH] autoupdate.yml aktualisiert --- autoupdate.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoupdate.yml b/autoupdate.yml index e88f109..6eff0f5 100644 --- a/autoupdate.yml +++ b/autoupdate.yml @@ -112,7 +112,8 @@ updatesrv="update.$(domainname -d)" if host ${updatesrv} >/dev/null 2>&1 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) hst=$(hostname | cut -d. -f1 | perl -pe 's/ //g') curl -s https://update.$(domainname -f)/${mac}--${usr}--${hst}.sh >${g_tmp}/update.sh