add logic to move config file into /mutable as part of configuring the archive

This commit is contained in:
Ray Tanaka
2018-10-31 00:36:27 -07:00
parent 5e2b081246
commit 34690ca9d4

View File

@@ -1,10 +1,17 @@
#!/bin/bash -eu #!/bin/bash -eu
function configure_archive () { function configure_archive () {
echo "Configuring the archive for Rclone..." echo "Configuring rclone archive..."
echo "drive=$RCLONE_DRIVE" > /root/.teslaCamRcloneConfig echo "drive=$RCLONE_DRIVE" > /root/.teslaCamRcloneConfig
echo "path=$RCLONE_PATH" >> /root/.teslaCamRcloneConfig echo "path=$RCLONE_PATH" >> /root/.teslaCamRcloneConfig
if [ ! -L "/root/.config/rclone" ] && [ -e "/root/.config/rclone" ]
then
echo "Moving rclone configs in /mutable"
mv /root/.config/rclone /mutable/configs
ln -s /mutable/configs/rclone /root/.config/rclone
fi
} }
configure_archive configure_archive