NAS/Unix demon

This is where you can find the latest ADM official release. Feel free to discuss any questions regarding it here.
Post Reply
rk3
Posts: 5
youtube meble na wymiar Warszawa
Joined: Mon Dec 17, 2012 8:30 pm

NAS/Unix demon

Post by rk3 »

Hello,

I like to start git as a demon with in the UNIX start up face. I tried to do this with a new script in the /etc/init.d/ folder. But after a reboot the script is away.
So what is the best approach to start additional demons?

Thanks
Ralf
User avatar
Steve@AST
Posts: 150
Joined: Tue Jun 05, 2012 4:20 pm

Re: NAS/Unix demon

Post by Steve@AST »

Hi rk3,

Let me consult our engineer, I will get you back later with best approach.

br.

Steve
ASUSTOR AS-602T
MacBook Air
iPhone 4s, New iPad, iPod nano
User avatar
Steve@AST
Posts: 150
Joined: Tue Jun 05, 2012 4:20 pm

Re: NAS/Unix demon

Post by Steve@AST »

Hi rk3,

You can follow the the steps below to run the demon when system startup

1. login NAS via ssh client (e.g. Utility like "Putty" on Windows or "terminal" on Mac)

2. Put your script under /usr/local/etc/init.d/

3. Rename script name to SXXscript_name (S00 ~ S99: script execute order, S00 is in order of first, S99 is in order of last)

e.g.

Code: Select all

# mv /usr/local/etc/init.d/first_autorun.sh /usr/local/etc/init.d/S00first
# mv /usr/local/etc/init.d/last_autorun.py /usr/local/etc/init.d/S99last
4. Modify execute permission for this script

e.g.

Code: Select all

# chmod +x /usr/local/etc/init.d/S00first 
# chmod +x /usr/local/etc/init.d/S99last
5. You can try to execute this script, and check result

e.g.

Code: Select all

# /usr/local/etc/init.d/S01autorun
6. After system restart, your script should be run automatically

br.

Steve
ASUSTOR AS-602T
MacBook Air
iPhone 4s, New iPad, iPod nano
rk3
Posts: 5
Joined: Mon Dec 17, 2012 8:30 pm

Re: NAS/Unix demon

Post by rk3 »

Hi,

Thanks this documentation helps and finally also solved my question.
But I lost some time in testing and debugging. With your step 5 you can just test the script syntactical (and a little bit more but not the full functionality). The issue I run into was the path. The path from a user session and the demon is different. And I could not found a “central” log file where this kind of issues shows up. But is there some log files available we I can see the console outputs from the init.d scripts?

Thanks
Ralf
User avatar
Steve@AST
Posts: 150
Joined: Tue Jun 05, 2012 4:20 pm

Re: NAS/Unix demon

Post by Steve@AST »

Hi rk3,

I'm not quiet sure what do you mean "The path from a user session and the demon is different"
could you please put this in more detail?

br.

Steve
ASUSTOR AS-602T
MacBook Air
iPhone 4s, New iPad, iPod nano
Post Reply

Return to “[Official] For AS-60X Series”