refactoring to add back write configs script

This commit is contained in:
Ray Tanaka
2018-11-02 15:24:25 -07:00
parent d758757839
commit aefdb082d0
8 changed files with 28 additions and 12 deletions

View File

@@ -3,8 +3,8 @@
function configure_archive () {
echo "Configuring rclone archive..."
echo "drive=$RCLONE_DRIVE" > /root/.teslaCamRcloneConfig
echo "path=$RCLONE_PATH" >> /root/.teslaCamRcloneConfig
local config_file_path="/root/.teslaCamRcloneConfig"
/root/bin/write-archive-configs-to.sh "$config_file_path"
if [ ! -L "/root/.config/rclone" ] && [ -e "/root/.config/rclone" ]
then

View File

@@ -0,0 +1,6 @@
#!/bin/bash -eu
FILE_PATH="$1"
echo "drive=$RCLONE_DRIVE" > "$FILE_PATH"
echo "path=$RCLONE_PATH" >> "$FILE_PATH"