2
votes
3answers
60 views

Can I use Bash interpreter in service/daemon scripts?

I'm writing a Debian/Ubuntu service that should start on at runlevel 2-5. Most of the existing services I came accross are written using /bin/sh (Shell) interpreter while /bin/bash (Bash) offer lot ...
0
votes
4answers
335 views

Daemon process exiting when shell closes

I have a script which starts a daemon process and then sleeps for 20 seconds. If I run the script on SLES11 SP1 or RHEL6 then after the script exits the process is still running. If I run the script ...
0
votes
2answers
234 views

Shell Script Launching Child Processes

Disclaimer: I'm totally new to shell scripting, but have quite a bit of experience in other languages like PHP and Obj-C. I'm writing my first daemon script. Here are the goals: I want it to run ...
0
votes
2answers
577 views

shell script to start multiple Java programs from a directory at boot

I'm not sure if this is the best approach to this, It's my first time doing all of this (including writing shell scripts). OS: Centos My problem: I want to start multiple shell scripts at boot. One ...
1
vote
2answers
161 views

init.d service died

Adapting some code from a linux forum, I've added a service script to /etc/init.d on my ubuntu natty server to start/stop/restart node.js It literally was working the first day I made it, but then ...
2
votes
2answers
2k views

How to set system environment variables for Linux services?

I need to setup environment variables for application servers. For example: ORACLE_HOME, ORACLE_SID, JAVA_OPTS, CATALINA_BASE. I know how to set system environment variables in Windows, but no ideas ...
2
votes
7answers
2k views

Shell script to execute something when one of the daemon dies?

I just had to build two instances of daemon running on different ports. let's say they both serve critical missions for some applications. How can I do some automatic task (eg. shell script) ...