bankjaneo / qnap-autorun

Create an autorun environment on your QNAP NAS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is a run-once BASH script to create an autorun environment on your QNAP NAS. This can be used to automatically execute your own scripts when the NAS boots-up.

What it does

This installer script writes an autorun.sh processor into your default volume, below the .system directory. It then symlinks this into the DOM so that it's triggered on NAS startup. It also creates a scripts directory for your own custom creations and NAS modifications. Everything in the scripts directory is run (in order) during NAS startup.

Running the installer

curl -skL https://git.io/create-autorun | sudo bash

Notes

  • The location of the autorun system will depend on your default volume name. For example: my default volume is MD0_DATA, so the automatic processor is created at:
    /share/MD0_DATA/.system/autorun/autorun.sh

... and the scripts directory is created at:

    /share/MD0_DATA/.system/autorun/scripts/
  • autorun.sh is triggered at some point during NAS bootup, which then runs each executable file in the scripts directory in the default filename list order. If you need to run one script before the other, prefix them with a number such as:
    010-example.sh
    020-example.sh
    025-example.sh
  • A log file is created during autorun.sh execution. It is located at /var/log/autorun.log and contains the date-time and name of each of the scripts found in the scripts directory as they were run, as well as any captured stdout.

About

Create an autorun environment on your QNAP NAS

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%