]> git.nbdom.net Git - nb.git/commitdiff
bin/crontab_install
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 14 Jun 2025 09:07:43 +0000 (11:07 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 14 Jun 2025 09:07:43 +0000 (11:07 +0200)
bin/crontab_install

index f0084c19ddd9446b5e89fc13a63d1d5fae99c044..de9421185956860497867dae4103125bf54c01dd 100755 (executable)
@@ -60,10 +60,13 @@ Nicolas Boisselier <nico@nbdom.net>
 
 cat_crontab() {
        local f
-       for f in .*crontab $(
-               (hostname -f; hostname -s) \
-                       | awk '!x[$1]++ && "$1"!="localhost" && !/^ *$/{print ".crontab-host."$1;print ".crontab*."$1}' \
-       ); do
+       for f in \
+               .*crontab \
+               $( \
+                       (hostname -f; hostname -s) \
+                               | awk '!x[$1]++ && "$1"!="localhost" && !/^ *$/{print ".crontab*."$1}' \
+               ) \
+       ; do
                [ "$DEBUG" = "0" ] || echo "DEBUG: EXISTS: $([ -r "$f" ] && echo YES || echo "NO "): $f" 1>&2
                #[ "$DEBUG" = "0" ] || echo "DEBUG: $f $([ -r "$f" ] || echo "NOT ")EXISTS" 1>&2
                [ -r "$f" -a -s "$f" ] || continue