Giter Site home page Giter Site logo

create-autorun's Introduction

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.sh | bash

Notes

  • For those with QTS > 4.3.x, you'll also need to let QTS know that it should permit the autorun.sh script to execute. Navigate to Control Panel -> System -> Hardware, then enable the option "Run user defined processes during startup".

  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.