hope i am not going too off-topic.
if true then sorry, please just ignore this post but it might help other rcloners.
if it is of use, please let me know.
i agree that your suggested feature should be implemented.
until that happens, i used autoexpect
to create crypt.rclone.config.file.exp
, lightly edited,
which will crypt the config without using rclone config.
#!/usr/bin/expect -f
set force_conservative 0 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
set timeout -1
spawn rclone config --config=/home/user01/rclone/scripts/test.conf
match_max 100000
expect -exact "Current remotes:\r
\r
Name Type\r
==== ====\r
\r
e) Edit existing remote\r
n) New remote\r
d) Delete remote\r
r) Rename remote\r
c) Copy remote\r
s) Set configuration password\r
q) Quit config\r
e/n/d/r/c/s/q> "
send -- "s\r"
expect -exact "s\r
Your configuration is not encrypted.\r
If you add a password, you will protect your login information to cloud services.\r
a) Add Password\r
q) Quit to main menu\r
a/q> "
send -- "a\r"
expect -exact "a\r
Enter NEW configuration password:\r
password:"
send -- "supersecretpassword\r"
expect -exact "\r
Confirm NEW configuration password:\r
password:"
send -- "supersecretpassword\r"
expect -exact "\r
Password set\r
Your configuration is encrypted.\r
c) Change Password\r
u) Unencrypt configuration\r
q) Quit to main menu\r
c/u/q> "
send -- "q\r"
expect -exact "q\r
Current remotes:\r
\r
Name Type\r
==== ====\r
\r
e) Edit existing remote\r
n) New remote\r
d) Delete remote\r
r) Rename remote\r
c) Copy remote\r
s) Set configuration password\r
q) Quit config\r
e/n/d/r/c/s/q> "
send -- "q\r"
expect eof