How to start a custom service on the NAS 325 v2
January 13, 2019 10:00AM
I have the Zyxel NSA325 v2 NAS storage with the original firmware version: V4.81(AALS.1)

Now I want to run syncthing application on it. The syncthing is not originally supported by the packages available, but it works without problems on my NAS when unpacked and started manually.

What I need is to start the syncthing automatically when the NAS boots up. I have created 'SYNCTHING' init script (attached), but I am not able to plug it into the boot sequence. First, I have copied it into '/etc/init.d', but it disappeared from there every new boot. Then I installed it into '/usr/local/zy-pkgs/etc/init.d/', when it remains, but it still is not started (manual start by calling '/usr/local/zy-pkgs/etc/init.d/syncthing start' works, though).

Don't you know, what I am missing? Is there something, which must be carried out to convince the init system to call the startup script?

Thank you very much.
open | download - SYNCTHING (2.4 KB)
Re: How to start a custom service on the NAS 325 v2
January 14, 2019 02:33AM

Sorry I can’t help you with stock FW. You might want to try NASCentral forum.

Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to start a custom service on the NAS 325 v2
January 25, 2019 05:17PM
I have finally able to manage it.

The trick is:
  • paste the init script into /usr/local/zy-pkgs/etc/init.d/
  • start is trigered by startup argument, stop by shutdown argument

The source of information was in http://zyxel.nas-central.org/wiki/Boot_process_(300_series). There is /ram_bin/etc/init.d/rcS2 script (trigered as the last action in /etc/init.d/rcS) and in turn that starts /etc/init.d/zypkg_controller.sh. There, the /usr/local/zy-pkgs/etc/init.d is searched and additional scripts are started with "startup" argument.

The working init script is in the attachment.

open | download - SYNCTHING (2.1 KB)

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.