I want to add a environment variable to my router that runs before rclone starts (I put rclone command in the post-mount script), but also sets itself for both any ssh sessions I start, and system-wide so the rclone program always knows where it's new 'default config location' always will be. Oh, and I need this environment variable (envar?) to work in any shell, (sh, bash (are there others?) are built-in as we know, I use fish for my ssh sessions).
Doing this because typing 'rclone --config /tmp/mnt/usb_drive/dir1/dir2/rclone.conf config' instead of 'rclone config' etc is quite annoying having to remember the same thing every time I connect via ssh.
I'm thinking:
#!/bin/sh
# rclone config new default location
RCLONE_CONFIG=/dir/dir/rclone.conf
EXPORT RCLONE_CONFIG
or maybe just a
set RCLONE_CONFIG=/dir/rclone.conf
Doing this because typing 'rclone --config /tmp/mnt/usb_drive/dir1/dir2/rclone.conf config' instead of 'rclone config' etc is quite annoying having to remember the same thing every time I connect via ssh.
I'm thinking:
#!/bin/sh
# rclone config new default location
RCLONE_CONFIG=/dir/dir/rclone.conf
EXPORT RCLONE_CONFIG
or maybe just a
set RCLONE_CONFIG=/dir/rclone.conf