rsync will not be using the mnt/archive folder

It'll instead bypass and just call itself on its own
This commit is contained in:
Gocnak
2018-10-20 05:30:57 -04:00
parent b60b787953
commit de3371f00c
3 changed files with 23 additions and 16 deletions

View File

@@ -108,7 +108,6 @@ function create_usb_drive_backing_files () {
function configure_archive () {
echo "Configuring the archive..."
mkdir /mnt/archive
if [ $RSYNC_ENABLE = true ]
then
echo "Configuring for Rsync..."
@@ -117,6 +116,7 @@ function configure_archive () {
echo "path=$RSYNC_PATH" > /root/.teslaCamRsyncConfig
else
echo "Configuring for a shared drive..."
mkdir /mnt/archive
local archive_server_ip_address="$(ping -c 1 -w 1 $archiveserver 2>/dev/null | head -n 1 | grep -o -e "(\([[:digit:]]\{1,3\}\.\)\{3\}[[:digit:]]\{1,3\})" | tr -d '()')"
echo "//$archive_server_ip_address/$sharename /mnt/archive cifs vers=3,credentials=/root/.teslaCamArchiveCredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0" >> /etc/fstab