However, this works unless my rclone.config is not encrypted. Whenever I encrypt it, the mount script breaks.
Of course, I am aware of the fact that the script isn't able to read the config any longer as it is encrypted... that's obvious!
Accordingly, there must be a possibility to store the password for the config in the mount script or (would be better) to refer to a location where to read the pw from?!
If your scenario is not covered by this somehow, or you are unable to do what the documentation suggests - point out exactly where it fails or how your setup is different to what is described.
By the way - aren't you supposed to use
at the end of every line (except last) in a multi-line command like what you are doing for your rclone mount command? I'm not a regular Linux user so I may be wrong, but that's generally how bash works, so unless it's some difference of formatting in a service file specifically.
Thank you! I've read that and it works in case of manual mounting a remote by typing the mount commands + eg flags.
However, let's say after a reboot I will have to source it (the set-rclone-password file)again, won't be so? The main idea of my script is to automatically mount the remote on a system start. I suggest that I will have to source the file again before mounting the remote.
You may suppose me as stupid but I don't get it. Sorry, I am new in that field.
In your systemd service file, you can add the password:
If it is safe in your environment, you can set the RCLONE_CONFIG_PASS environment variable to contain your password, in which case it will be used for decrypting the configuration.
Sorry, the forum formatting ate the spacial characher (nom nom!).
What I tried to show you was
\
I think Animosity covered your other question adequately
Also he's the Linux guy so if there some different formatting in the service compared to bash, he would be the one to know. I just want to make sure you aren't accidentally skipping your flags