From b3494945640c0fe4099dec49b3adeb468827c806 Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 28 Sep 2023 14:45:07 +0200 Subject: [PATCH] autoupdate.yml aktualisiert --- autoupdate.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoupdate.yml b/autoupdate.yml index 96e9d39..b2369ec 100644 --- a/autoupdate.yml +++ b/autoupdate.yml @@ -85,7 +85,7 @@ marker: "# {mark} ANSIBLE MANAGED BLOCK" block: | # Server-Config in Git - cd /root || exit 0 + cd /root [ -d /root/server-$(hostname -s) ] && rm -r /root/server-$(hostname -s) git clone ssh://git@gitea.ds9.dedyn.io:333/olli/server-$(hostname -s).git >/dev/null 2>&1 || exit 0 if [ -e /root/server-$(hostname -s)/$(hostname -s).sh ] @@ -94,8 +94,9 @@ g_echo_warn "$(egrep -B1 "^changed" /var/log/server-$(hostname -s)-update.log)" g_echo_error "$(egrep -q -B1 -i '^error|^fatal' /var/log/server-$(hostname -s)-update.log && egrep -B50 '^error|^fatal' /var/log/server-$(hostname -s)-update.log)" else - g_echo_warn "no server-update-script found /root/server-$(hostname -s)/$(hostname -s).sh" + g_echo "no server-update-script found /root/server-$(hostname -s)/$(hostname -s).sh" fi + [ -x /usr/local/sbin/mint-config-update.sh ] && /usr/local/sbin/mint-config-update.sh backup: yes validate: /bin/bash -n %s