RunLast creates an environment to run commands or shell-scripts after QPKG re-integration has occurred during QTS NAS bootup.
This allows you to run scripts dependent on QPKGs during QTS startup.
What it does
This package creates a scripts directory in the package installation path:
init.d
scripts
Place your SysV-style scripts in the init.d directory. These will be executed with a start parameter after NAS startup, and with a stop parameter before NAS shutdown. Scripts in the scripts directory will be executed only during startup, and always after the custom init.d start script execution.
Installation
Available in the MyQNAP repo, and can also be installed via the sherpa package manager.
Notes
When this package is installed, thereās not much to see. Find the package icon and click the āOpenā button to display the current log file - any stdout and stderr from your scripts will be shown here.
The log file is viewable via your web browser but is not a real web document, so it can change without your browser noticing. Whenever viewing the log, ensure you force a page refresh: CTRL+F5.
To jump to the scripts directory:
cd $(getcfg RunLast Scripts_Path -f /etc/config/qpkg.conf)
Or, to jump to the init.d directory:
cd $(getcfg RunLast SysV_Path -f /etc/config/qpkg.conf)
The source for this project can be found on GitHub.
Please do not stop developing āRunLast", please !. And donāt make it worse than it is! It already follows the right approach, especially because of the nice structure of the SysV start scripts. You can get almost anything to run with it if the user considers the dependencies of his application on other QPKGās and steals a little from their start scripts. You should mention that and point it out!
I Think āRunLastā is feature enough in implementing a custom start- and stop-environment to QNAP-Devices
Maybe you can think of something in the future that allows you to generate your own dependency key from all installed, active QPKGs when starting.
⦠and a wooden spoon as an icon, seriously?
Best regards,
Mandragor59
***** There are no problems, there are only challenges *****
Already tried it. Unfortunately, QTS stalls when attempting to load a dependency key with more than a handful of values.
Yes, you understand the reference right? Besides, you had your chance to suggest something better.
Iāve been considering adding support for QTS 5.2.0 and-later by getting RunLast to wait for the QTS QPKG init proc to exit. When it does, then assume all QPKGs are started and run the user-scripts.
Iāll do some work on this and see how reliable it is. Maybe RunLast can be resumed?
Please do it! Absolutely ! In any case ! They will love you for it!
⦠and maybe you consider to make your ādescriptionā not so negative and ask for uninstallation right away ! Maybe you better add a note that in QTS 5.2.0 or later you have to consider the dependencies to the required QPKGās in the start scripts (at the moment).
***** There are no problems, only challenges *****
ā¦
Well, not really. The only reference I can think of as an amateur cook to my wooden spoon is that it doesnāt fit in my mouth. Perhaps you can enlighten an older German user. I would (if asked again) rather choose a medal or a winnerās trophy with the inscription āLast Placeā.
I like to set expectations low, right from the outset.
Thereās already a note in the OP about this.
In various countries (such as mine with a strong sports culture), the āwooden spoon awardā is given to a sports team that comes dead-last each year. Itās not a real award.