Mainly add external monitoring of mail server
[distro-setup] / conflink
index 0ae24c332cce236812b3d2521bd332edd8f96934..093dc2d725cb4901221e0daf4266c7b2069d8b1e 100755 (executable)
--- a/conflink
+++ b/conflink
@@ -24,7 +24,6 @@ m() {
 s() { sudo "$@"; }
 
 lnf() { /a/exe/lnf "$@"; }
-now=$(date +%s)
 
 # error prone
 #f=~/.local/conflink
@@ -89,10 +88,13 @@ common-file-setup() {
       # but I haven't looked at the symlinks.
       # s rsync -n -ahviSAXPH --specials --devices --chown=root:root --chmod=g-s $fs /
       # note, symlinks get resolved, not copied.
-      if s tar --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -dz -C / | grep /etc/systemd &>/dev/null; then
+      if s tar --anchored \
+           --exclude etc/dovecot/users \
+           --exclude etc/exim4/passwd \
+           --exclude etc/exim4/*.pem \
+           --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -dz -C / | grep /etc/systemd &>/dev/null; then
         systemd_reload=true
       fi
-      s tar --mode=g-s --owner=0 --group=0 -cz -C $fs . | s tar -xz -C /
     fi
 
     if [[ -e $dir/subdir_files ]]; then