NETGEAR - Readynas 4.x 5.x Start your own Service - MAY VOID WARRANTY

The Views Expressed Below Do not in any way reflect Internal Doctorine or Official Statements of Netgear Inc. These are just my notes - Use at your own Risk.

Want to start a service on the NAS - READYNAS 4.x and READYNAS 5.x
###################################################################

* Note Netgear can void your warranty if rootssh (or SSH) is used on your system

To start a service put a script in the 
/var/spool/frontview/boot/

touch 100_SERVICENAME
chmod +x 100_SERVICENAME
vi touch 100_SERVICENAME

To turn it off when the nas shuts down put a script in the 
/var/spool/frontview/shutdown/ 


touch 100_SERVICENAME
chmod +x 100_SERVICENAME
vi touch 100_SERVICENAME

If you have more then 1 service you would like to start, I would just make more of these files just increment the number by 1, so the next one will be 101 for boot and shutdown (I know that shutdown should be handled in reverse but for now this is okay)

A thought - if you have several things that you want to start on boot and shutdown on shutdown of the unit, maybe consider just having one file for boot and one file for shutdown like this /var/spool/frontview/boot/100_All_of_my_personal_services and /var/spool/frontview/shutdown/100_All_of_my_personal_services 

Example:
##########
Lets say you installed the software syncrify and you want it to start on boot.

When you installed it, it put its service file into /etc/init.d automatically

So manually you would start it like this:

/etc/init.d/syncrify start
OR:
service syncrify start

And to shut it off manually you would do this:

/etc/init.d/syncrify stop
OR:
service syncrify stop

syncrify and you need it to start when the nas starts.

So here is how we do it:

For the boot up:
-----------------

# cd /var/spool/frontview/boot
# ls

Make sure we are not using a number thats already taken, I use 100, or just the biggest number, I want this thing to start last (I want the NAS operations to start first) - generally 100 is a good nuymber

# touch 100_Syncrify
# chmod +x 100_Syncrify
# vi 100_Syncrify

In the script I would put this (type i to start typing, and when done :wq! to save and exit)

#!/bin/bash
service syncrify start

For the shutdown:
------------------

# cd /var/spool/frontview/shutdown
# ls

Same as before make sure the # 100 is not taken.

# touch 100_Syncrify
# chmod +x 100_Syncrify
# vi 100_Syncrify

In the script I would put this (type i to start typing, and when done :wq! to save and exit)

#!/bin/bash
service syncrify stop

SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
Comments