Blogs‎ > ‎

QNAP Turbo NAS Startup Script

posted 25 Jun 2015, 09:44 by Andrew at Lycom   [ updated 25 Jun 2015, 15:17 ]
Previously, I set out how to configure a BIND DNS server on your QNAP NAS box (in my case a QNAP t269l).

However, as it the way with things, next time I rebooted my NAS the BIND DNS service didn't restart. Ah, forgot that bit.

So, I consulted: http://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup#QPKG-based_method and amended the instructions there to create an autorun script:

nano /etc/config/qpkg.conf

[autorun]
Name = autorun
Version = 0.1
Author = andrewlyon
Date = 25-06-2015
Shell = /share/CACHEDEV1_DATA/.qpkg/autorun2/autorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/autorun2
Enable = TRUE

Then I created autorun.sh in /share/CACHEDEV1_DATA/.qpkg/autorun2

#!/bin/sh
CONF=/etc/config/qpkg.conf
QPKG_NAME="autorun"
# autorun script for Turbo NAS
# start BIND DNS server
/opt/etc/init.d/S09named start
exit 0


chmod to make executable, then ran it to check:

./autorun.sh

Starting DNS Services: started

Rebooted my Turbo NAS to test, DNS server started OK so job done.