Autostart.sh not enacting as requested (RClone Mounting)

I am trying to get rclone to mount on boot.

If i run the script manually SSH once the system is already booted, it works perfectly every time.

my autostart.sh file is as follows:

./rclone mount GoogleDrive: /storage/drive/" > /storage/.config/autostart.sh

iv also tried some other recommendations looking around.

export HOME=/storage; sleep 30; ./rclone mount GoogleDrive: /storage/drive/

Why is the autostart.sh not enacting ? I do see as I increase the sleep duration, a longer pause occurs on the boot screen. Why is it then ,that the drive cannot mount unless done manually via SSH, once the device is already in kodi?

Any help would be greatly appreciated!! :slight_smile:

Using the latest nightly, Odroid N2

First of all try using full path to rclone. No need to export home.

1 Like

If rclone is directly in the outermost main folder (prior to /storage, whats the “full” path?

Thanks for the reply btw :slight_smile:

You need a quick course of linux.

rclone is not installed by default in CoreELEC. Install rclone first. If you have already installed entware then run opkg install rclone.

To use rclone simply run:

rclone
or
$(which rclone)
or
<path_to_rclone>/rclone

./rclone will not work because it looks for the command only in the current directory

(Before entering command lines in autostart.sh first test on SSH command line)

CoreELEC has forced me to improve my linux level :rofl:

I admit I am not very proficient with linux.

As I had mentioned, I have Rclone installed through following their documentation. I mounted my cloud google drive through their procedure. I copied rclone over to my local main drive directory, and am running the mount command from this default directory.

The issue originally was, when i reboot, id have to re imput the SSH command. This is when i figured to put the command in autostart.sh.

The command I have works perfectly once im already booted up and SSH’d into the box . It just wont enact in autostart.sh.

Im not sure exactly what the “full” path might be for rclone.

What would be the full path to /rclone/ ? simply : /rclone/ ?

Thanks again everyone for the help!

To see the path for rclone, run which rclone (literally, don’t change anything)

Instead of ./rclone/ i put /storage/rclone/

it workd while in SSH, however now that i changed autostart.sh , it wont leave the coreelec boot logo on restart .

command used to edit autostart.sh :

echo “sleep 25; /storage/rclone mount GoogleDrive: /storage/drive/” > /storage/.config/autostart.sh

Please write in SSH: which rclone

Another thing, the echo line command you are using is very dangerous because it will erase the current autostart.sh content. Edit the file with the nano /storage/.config/autostart.sh command

Oh, are there default autostart functions that come with coreelec? I hadnt known this. The echo command was reccomended to me at a prior date on the forums.

After a clean installation of CoreELEC autostart.sh it is empty but as you enter commands this file will get bigger, mine has 1088 bytes and 23 command lines.

I only use the single command for now! so it shouldnt be an issue! I will keep this in mind however!

By the way,

i fixed the issue completely now! I had to point to /storage/rclone instead of ./rclone!

I still needed to use a nohup command to get it to work properly, otherwise it stayed stuck in the boot screen indefinitely.

echo “nohup sleep 10; /storage/rclone mount GoogleDrive: /storage/drive/ &” > /storage/.config/autostart.sh

After a few weeks on linux you will see that ‘storage’ is not the right directory to save binary linux apps.

In relation to the ‘nohub’ command type ‘nohub’ and you will see the syntax of this command. I have never used it.

Luck!

what are the negative implications of save binary linux apps? im curious now :slight_smile:
Thanks again for your help btw,

things are working great now

https://www.interserver.net/tips/kb/linux-binary-directories-explained/