From a59da4d8781fd6aa578a0e43d2ea036bee2164f5 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Tue, 29 Oct 2019 10:46:43 +0100 Subject: [PATCH] Set dates --- regenerate_hosts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regenerate_hosts.sh b/regenerate_hosts.sh index 1f6f271..5a68ac2 100755 --- a/regenerate_hosts.sh +++ b/regenerate_hosts.sh @@ -2,7 +2,7 @@ BASE_MACS="6c:4b:90 a4:1f:72 78:45:c4 64:00:6a b0:83:fe d4:be:d9 00:23:24" arg="c8:1f:66" registry="/etc/registry/hosts" -cp $registry $registry.bak +cp $registry "$registry_$(date '+%Y%m%d_%H%M')" for mac in $BASE_MACS do arg="$arg\| $mac" @@ -21,6 +21,6 @@ do done for mac in $MACS do - echo "20191025 $mac inconnuAutoGen" >> $registry + echo "$(date '+%Y%m%d') $mac inconnuAutoGen" >> $registry done systemctl restart registry wakeonlan -- GitLab