I have the following in my /etc/rc.local file, but the mount doesn’t run on boot, but does if I run it manually.
#!/bin/sh -e
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
rclone mount Dropbox: /Dropbox --allow-other --daemon
exit 0
it is possible that rc.local is attempting to execute this prior to the actual completion of the boot cycle and network coming up. rc.local is the last process to be started, but it is not necessarily the last one to be completed. Obviously, the network would be required for this to run.
How about putting this line of code into a separate script file, and add a logger statement. Test the script file and make sure it works... then add that script file to the rc.local and see what the log says.
So rc.local is running. I removed the rclone mount command and added /rooot/mount.sh which contains the rclone Dropbox mount command. This still doesn't mount on boot, but does manually. Logging rclone reveals that it can't find the rclone conf file, but does when run manually. What's going on???!!! Thanks!
Notice that it looks for the file on "/.config/rclone" when run from "rc.local", but on "/root/.config/rclone" when run from the command line. Your script is looking for the config file in the "current" directory, and that is a bug; do "cd /", then launch the script, and see it fail. You must use full paths, or proper search paths.