|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
#!/usr/bin/env -S guix shell bash -- bash |
|
|
|
|
#!/usr/bin/env -S guix shell --manifest=cron-manifest.scm -- bash |
|
|
|
|
|
|
|
|
|
test -e /tmp/cron-10-test.sh.lock && find /tmp/cron-10-test.sh.lock -cmin +10 -delete |
|
|
|
|
|
|
|
|
|
@ -13,16 +13,18 @@ touch /tmp/cron-10-test.sh.lock
|
|
|
|
|
|
|
|
|
|
set -x |
|
|
|
|
|
|
|
|
|
INVENTORY_FILE=/data/xhrpb-guix-config/inventory |
|
|
|
|
|
|
|
|
|
mac=$(ip link show | awk '/link\/ether/{ print $2 }' | head -n1 | sed 's/://g') |
|
|
|
|
|
|
|
|
|
hostname=$(grep "^$mac" inventory | awk '{ print $2 }') |
|
|
|
|
hostname=$(grep "^$mac" "$INVENTORY_FILE" | awk '{ print $2 }') |
|
|
|
|
|
|
|
|
|
if test -z "$hostname" |
|
|
|
|
then |
|
|
|
|
hostname=guix-template |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
host_conf=$(hostname).scm |
|
|
|
|
host_conf=${hostname}.scm |
|
|
|
|
|
|
|
|
|
cd /data/xhrpb-guix-config |
|
|
|
|
|
|
|
|
|
|