Skip to content

Commit

Permalink
Improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaang committed Nov 28, 2020
1 parent b8ea59b commit e310c92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wdpk/rclone/preinst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ APKG_BACKUP_PATH=${APKG_PATH}/../${APKG_MODULE}_backup
if [ ! -d ${APKG_BACKUP_PATH}] ; then
# move config to backup path
mkdir -p ${APKG_BACKUP_PATH}
mv -f $APKG_PATH/config ${APKG_BACKUP_PATH}
mv -f ${APKG_PATH}/rclone.config ${APKG_BACKUP_PATH}
fi
4 changes: 3 additions & 1 deletion wdpk/rclone/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
cd $(dirname $0)
source ./env

CONFIG=$(pwd)/rclone.config

[ ! -f /usr/bin/rclone ] echo "rclone not found" >> /tmp/debug_apkg

[ -f /tmp/debug_apkg ] echo "APKG_DEBUG: starting Rclone" >> /tmp/debug_apkg
Expand All @@ -12,4 +14,4 @@ source ./env
ADDRESS=$(sed -n '/ip/ {s/.*<ip>\(\S*\)<\/ip>/\1/p;q}' /etc/NAS_CFG/config.xml )

# TODO: get user and pw from file
rclone rcd --rc-web-gui --rc-addr ${ADDRESS}:${PORT:-5582} --rc-user ${RCLONE_USER:-mycloud} --rc-pass ${RCLONE_PW:-mycloud}
rclone rcd --config ${CONFIG} --rc-web-gui --rc-addr ${ADDRESS}:${PORT:-5582} --rc-user ${RCLONE_USER:-mycloud} --rc-pass ${RCLONE_PW:-mycloud}

0 comments on commit e310c92

Please sign in to comment.