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
NAS/Unix demon
- Steve@AST
- Posts: 150
- Joined: Tue Jun 05, 2012 4:20 pm
Re: NAS/Unix demon
Hi rk3,
Let me consult our engineer, I will get you back later with best approach.
br.
Steve
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
MacBook Air
iPhone 4s, New iPad, iPod nano
- Steve@AST
- Posts: 150
- Joined: Tue Jun 05, 2012 4:20 pm
Re: NAS/Unix demon
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.
4. Modify execute permission for this script
e.g.
5. You can try to execute this script, and check result
e.g.
6. After system restart, your script should be run automatically
br.
Steve
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
e.g.
Code: Select all
# chmod +x /usr/local/etc/init.d/S00first
# chmod +x /usr/local/etc/init.d/S99last
e.g.
Code: Select all
# /usr/local/etc/init.d/S01autorun
br.
Steve
ASUSTOR AS-602T
MacBook Air
iPhone 4s, New iPad, iPod nano
MacBook Air
iPhone 4s, New iPad, iPod nano
-
- Posts: 5
- Joined: Mon Dec 17, 2012 8:30 pm
Re: NAS/Unix demon
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
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
- Steve@AST
- Posts: 150
- Joined: Tue Jun 05, 2012 4:20 pm
Re: NAS/Unix demon
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
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
MacBook Air
iPhone 4s, New iPad, iPod nano