+ auto mount of syncDir

This commit is contained in:
tuxwarrior
2024-05-06 17:03:04 -05:00
parent 1eb0c27831
commit 1d9cd5b3cf

View File

@@ -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 ""