From 1d9cd5b3cf69ba19f51e8f7885f51d73b56564bd Mon Sep 17 00:00:00 2001 From: tuxwarrior Date: Mon, 6 May 2024 17:03:04 -0500 Subject: [PATCH] + auto mount of syncDir --- dots/bin/syncDirSetup.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dots/bin/syncDirSetup.sh b/dots/bin/syncDirSetup.sh index 2a4d8d7..77fcb33 100755 --- a/dots/bin/syncDirSetup.sh +++ b/dots/bin/syncDirSetup.sh @@ -57,4 +57,16 @@ else du --human-readable --max-depth=1 ${trg_dir} fi -echo +# set up auto mount +the_file=/etc/fstab +if [ -f "${the_file}" ]; then + if ! more ${the_file} | grep 'syncDir' + then + echo "# auto mount syncDir" | sudo tee -a ${the_file} + echo "${src_dir} ${trg_dir} auto defaults,nofail,nobootwait,bind 0 2" | sudo tee -a ${the_file} + + echo "auto mount added to '${the_file}'" + fi +fi + +echo ""