Startup and Shutdown Script

Q'center app, Helpdesk app
Post Reply
colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Startup and Shutdown Script

Post by colordrome » Fri Oct 11, 2019 12:16 am

I need to run Rclone on Plex to mount a few remote folders from Google Drive. The problem is that when I restart the NAS (I have a TS 453B) all the remotes are gone. I have been reading this link: https://wiki.qnap.com/wiki/Running_Your ... at_Startup but I did not understand even a bit of that. I don´t know Linux at all but I could follow a simple step by step guide. It would be very helpful if someone could help me out please! Thanks a lot!

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Fri Oct 11, 2019 12:40 am

I guess the official forum was a dud for you

https://forum.rclone.org/t/mounting-goo ... -nas/12202

putting the commands you use to mount them each time in a startup script does not work ?

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Fri Oct 11, 2019 10:14 pm

Well Dolbyman, the problem is that I really don´t have any idea on how to use Linux commands but I was able to mount remotes in Plex with Rclone by copying and pasting from different tutorials. I was just hoping someone could explain to me, in the most comprehensible manner, how to achieve that. Maybe following a few steps?

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 12:00 am

Where is the official forum anyway? I couldn´t find it

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Sat Oct 12, 2019 12:04 am

I linked to it just under my statement .. and you must have found it, as you posted the same question there

try asking the question in the Plex forum or bump your question in the rclone forum again, as the question (what commands to issue to mount cloud storage) is more specific to rclone or Plex than QNAP

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 12:38 am

Well that´s funny because I have done the same thing in Plex and Rclone forums and I have been told to ask the same question in a QNAP forum! This is why I am doing right now! It seems to me like I am out of luck on this one. Finding this answer is like dealing with politicians, nobody will know the answer and you keep on going in circles! You said you included the link to the right forum but when I click on that link it will redirect me to my own post!

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Sat Oct 12, 2019 3:22 am

I know it's your own post .. that's the rclone forum

just because the programs run on qnap does not mean anyone here knows how to use it

it's like asking in a microsoft forum why program xyz is not doing what your want (that support needs to come from the program maker/support)

he commands you need are probably the same no matter if QNAP/Syno/linuxbox

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 3:57 am

Well I just need for someone to tell me how to run and edit the autorun.sh script that runs at startup, as simple as that!

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Sat Oct 12, 2019 4:20 am

when activated as stated in the wiki you posted above

[quote]Starting from QTS 4.3.3 it's required to enable the autorun.sh processing in the Control Panel -> Hardware -> General: Run user defined startup processes (autorun.sh) [/quote]

[attachment=0]autorun.JPG[/attachment]

mount then edit it via console (e.g. vi) or sftp as described in the guide

make it executable and unmount it (like the guide says)

then your autorun script should run on startup
You do not have the required permissions to view the files attached to this post.

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 4:28 am

Thanks Dolbyman! I do appreciate your help. I saw that in the control panel before and I have already enabled it. The thing that I don´t know how to do is exactly what you were saying

How do you mount it and edit it via console? Sorry but I am confused I¡m not trying to give you hard time believe me :) Sorry be patient with me I am new here :)

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 4:33 am

Ok sorry, let me rephrase it....

I have followed all the steps in the wiki guide and I was able to open up the autorun.sh script but at this point I wouldn´t know how to edit it.

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Sat Oct 12, 2019 4:39 am

just write into it

vi is an editor ... when done editing:

hit
<<esc>>
then enter (without the")
":wq"

this will save the file

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 4:44 am

I know that I have to write in it dolbyman :)

What I don´t know is exactly what to write in it, in order to repeat the steps I was doing when mounting the remotes manually with Rclone. Do you know what I mean?

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Startup and Shutdown Script

Post by dolbyman » Sat Oct 12, 2019 5:00 am

then we are back at the beginning ..

maybe here someone uses that program and can give you some hints ..
or you might have to fight through the instruction manual
https://rclone.org/docs/

colordrome
Know my way around
Posts: 103
Joined: Tue Dec 19, 2017 3:27 pm

Re: Startup and Shutdown Script

Post by colordrome » Sat Oct 12, 2019 5:04 am

Yeah I hear ya Dolbyman, it's cool, I just need to talk to someone who has done this before. If for some reason you come across someone who is having the same problem, can you please let me know?

Thank you so much for your help! I appreciate it!

Post Reply

Return to “NAS Management”