Page 1 of 2

4.3.3.0262 build 20170727 - Autorun Feature

Posted: Tue Aug 01, 2017 10:00 pm
by louiscar
So in the list for this firmware I saw this:

https://www.qnap.com/en-uk/download?mod ... y=firmware

[New Feature]
- Added support for sending notification mails in plain text.
- Added the option to choose whether non-QNAP apps can be installed in the App Center.
- Added the option to execute an autorun script upon NAS startup.
..............

Does anyone know how this is implemented and how to use it? I don't see any option in QTS so far to submit a script but there is no information anywhere that I can see how to use it.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Tue Aug 01, 2017 10:18 pm
by schumaku
Hi,

In Control Panel -> Hardware it is ... and the function search does not cover it :shock:

Autorun on QTS 4.3.3.0262 ff.PNG


Regards,
-Kurt

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Wed Aug 02, 2017 8:26 pm
by spycho
OK, thank you.
I also wondered where this feature is located. Now my question is where is the autorun.sh script located, there is only a 'view' but not a 'edit' button on the hardware menu.
Any suggestions?

Regards,
Marc

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Thu Aug 03, 2017 1:31 am
by schumaku
Hi Marc,

spycho wrote:Now my question is where is the autorun.sh script located, there is only a 'view' but not a 'edit' button on the hardware menu.
I'd wish there would be an [Edit] option here, too.

Creating and maintaining the autorun.sh file must be done "the hard way" as shown here -> https://wiki.qnap.com/wiki/Running_Your ... at_Startup ... use the editautorun.sh approach (just the commands, or keep it as a file) - but the appropriate one matching your NAS model.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Fri Aug 04, 2017 9:39 am
by louiscar
Rather late to answer Kurt because I didn't subscribe to my own post :-)
Thanks for your reply - actually I had slung the question at a tech as I had a ticket open for something else and they showed me.

I had noticed that my autorun wasn't working and of course I had put one in some time ago after seeing Patrick's post on the issue. Now all it seems to do is (as pointed out by spycho) it isn't exactly as one should describe "- Added the option to execute an autorun script upon NAS startup.", rather it appears to be a support for those who have used Patrick's method and to now enable it.

So if we are to be honest the feature should really read something like :

"- allows Autorun.sh to be enabled / disabled from the QTS desktop [default: disabled]"

because when this firmware was installed that setting was unchecked by default and of course it's disabled"

Really they should have completed the job and allowed a basic edit however, it would be interesting to see what the "view autorun.sh" does when someone hasn't installed it previously. Is it the same as Patrick's script which points to /etc/config/autrorun.sh AND then writes the confirmation that it ran by creating autrorun.ran ? If so then we probably don't need to edit it as all we need will go into /etc/config/autorun.sh .. and it would mean that Qnap have implemented Patrick's script directly.

Perhaps this was because a lot of people mentioned it ?? I know I asked a while ago before Patrick wrote his post and they said "why do you want to run things on boot??" - I had told them that a lot of stuff including cron jobs reset after a reboot but at the time this particular tech didn't get it.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Fri Aug 04, 2017 3:49 pm
by bugyou3
Another half-assed feature coming years late the implementation of which serves little purpose other than pi**ing people off with the horrible misimplementation. Very much useless as is. Sigh.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Fri Aug 04, 2017 5:47 pm
by kasimodo
sorry,
my english is too bad!

in german:

Das Eintragen einer eigenen Anwendung in die "qpkg.conf" (Autorun) wir in der aktuellen Firmwareversion von QNAP bewusst und aktiv geblockt!

Qnap hat in die /etc/init.d/init_qpkg.sh eine Funktion check_qpkg_official() eingebaut!

Diese Funktion setzt eure Anwendung Autorun auf Enable = False

Hier der Code aus der init_qpkg.sh (Ausschnitt):
Shell-Script: init_qpkg.sh

Code: Select all

....
check_qpkg_official()
{
   /sbin/qpkg_cli --check_official 0 2>/dev/null 1>/dev/null
}
....


Hier die Hilfe zur Bin: /sbin/qpkg_cli --check_official

https://forum.qnapclub.de/thread/44724-autorun-feature/?postID=265825#post265825

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Fri Aug 04, 2017 9:46 pm
by jamisiek1978
My English is not the best either. Since it is internationally I will be writing in Polish.

in: polish

Spotkał mnie dziś ten sam problem. Musisz dla swojego pliku prawidłowo wpisać wszystkie parametry qpkg.conf
Przykładowo:
Tworzymy skrypt autorun.sh w folderze ../.qpkg/autorun

Folder autorun powinien zawierać:
autorun.sh //twój skrypt
.list //lista plików w folderze - można zobaczyć w innych aplikacjach jak ten plik powinien wyglądać
.gpkg_icon.gif //plik ikony na pulpit QTS
.qpkg_icon_gray.gif //plik ikony czarno biały

Teraz wpis w qpkg.conf może wyglądać na przykład tak:
[autorun]
Name = Autorun
Class = null
Display_Name = Autorun
Version = 0.1
Author = Imię
QPKG_File = Autorun.qpkg //ta linijka musi być. Możesz wpisać jakąś bzdurę ale bez tej linii od razu zobaczysz czaszkę z błędem konfiguracji
Date = 2017-08-04
Shell = /share/CACHEDEV1_DATA/.qpkg/autorun/autorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/autorun
Enable = TRUE

To powinno wystarczyć. Jeśli faktycznie nadal uparcie będzie blokowany autorun.sh to po prostu nazwij to jakoś inaczej. U mnie aktualnie jest my_app.sh w folderze my_app i tak dalej. Po prostu nie używałem nigdzie wpisu autorun. Wszystko sprawdzone i działa.

powodzenia :)

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Fri Aug 04, 2017 10:03 pm
by jamisiek1978
Jeszcze jedno plik skryptu powinien zawierać po #!/bin/sh :

CONF=/etc/config/qpkg.conf
QPKG_NAME="Autorun"

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Sat Aug 05, 2017 6:30 am
by serban6
Hi, and in english how is looking like?

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Sat Aug 05, 2017 8:23 am
by Don
This is an English language forum. Please post in English.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Sun Aug 06, 2017 7:17 pm
by jamisiek1978
I think that with today's translator capabilities, information is more important than language.
However, if you are so orthodox and you are so bothered by it, then report these posts for removal.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Sun Aug 06, 2017 8:16 pm
by Moogle Stiltzkin
jamisiek1978 wrote:I think that with today's translator capabilities, information is more important than language.
However, if you are so orthodox and you are so bothered by it, then report these posts for removal.


https://translate.google.com/


From Youtube.com



From Youtube.com


agreed :) however out of courtesy probably should translate to english themselves beforehand, and not expect the english forum to do on their behalf.


Moogle translations :shock: via google translate

Today I encountered the same problem. You need to enter all parameters correctly for your file qpkg.conf

For example:
We create an autorun.sh script in a folder ../.qpkg/autorun

Folder autorun Should contain

Code: Select all

Autorun.sh // your script
.list // list of files in a folder - you can see in other applications how this file should look
.gpkg_icon.gif // QTS desktop icon file
.qpkg_icon_gray.gif // file icon black and white


Now the entry in qpkg.conf might look like this:

Code: Select all

[Autorun]
Name = Autorun
Class = null
Display_Name = Autorun
Version = 0.1
Author = Name
QPKG_File = Autorun.qpkg // this line must be. You can type some nonsense but without this line you will see skulls with configuration error right away
Date = 2017-08-04
Shell = /share/CACHEDEV1_DATA/.qpkg/autorun/autorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/autorun
Enable = TRUE

That should be enough. If you are still stubbornly going to be blocked by autorun.sh then just call it something else. My_app.sh is currently in my_app folder and so on. I just did not use an autorun entry anywhere. Everything checked and working.

Good luck 8)

- jamisiek1978



moogle random fun facts for the day :mrgreen:

However google translate may not always be perfect. i recall a few articles i read recently that came to mind

This one explains how mexicans perceive time culture differently. One guy ordered an ice cream thinking it's coming soon but when it didn't he asked again and the guy repeated dragging out the ‘i’ ‒ “Ahoriiiiita”. His face was a mix of confusion and maybe even embarrassment. apparently When someone from Mexico says ‘ahorita’, they should almost never be taken literally. “When a Mexican says ‘ahorita’, it could mean tomorrow, in an hour, within five years or never.” Kinda bizarre to most people from not mexico how anyone could be so lax and inprecise with something as important as time like that :shock:
http://www.bbc.com/travel/story/2017072 ... -tell-time


why people think German's aren't funny (it gets lost in translation, and when your expected to explain it to non german speakers, it's no longer funny)
http://www.bbc.com/travel/story/2017080 ... rent-funny


*added to my faq link :)

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Sun Aug 06, 2017 9:53 pm
by jamisiek1978
Ok you are right I will try to write only English as far as I can.

Re: 4.3.3.0262 build 20170727 - Autorun Feature

Posted: Mon Aug 07, 2017 4:34 pm
by jogi2404
Thank you for this helpful information. Now my Autorun works again after the firmware update.