Skip to content

Commit 034949d

Browse files
committed
feat: add .gitignore for rclone configuration and update README for config file description
1 parent 24a24b7 commit 034949d

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rclone.conf

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ docker run --rm -it -v $(pwd)/rclone.conf:/data/rclone.conf:ro \
2222

2323
| Variable | Description |
2424
|----------------------|-------------------------------------------|
25-
| `RCLONE_CONFIG` | Path to rclone config file |
25+
| `RCLONE_CONFIG` | Path to rclone config file or base64 |
2626
| `RCLONE_SOURCE` | Source location for rclone operation |
2727
| `RCLONE_DESTINATION` | Destination location for rclone operation |
2828
| `RCLONE_ARGS` | Additional arguments for rclone |

entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ if [ "$#" -gt 1 ]; then
1313
exit 1
1414
fi
1515

16+
if [ ! -f "$RCLONE_CONFIG" ]; then
17+
echo "$RCLONE_CONFIG" | base64 -d > /config/rclone/rclone.conf
18+
RCLONE_CONFIG="/config/rclone/rclone.conf"
19+
fi
20+
1621
rclone "$1" --config="$RCLONE_CONFIG" $RCLONE_ARGS "$RCLONE_SOURCE" "$RCLONE_DESTINATION"
1722

1823
if [ -z "$HEARTBEAT_URL" ]; then

0 commit comments

Comments
 (0)