Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Lets say we have got a daemon called test on one of our application server. We initiate the same at the system startup using script. But daemon is not starting through this script. It shows as Daemon started alongwith the pid in Log files but seems it dies as soon as it starts. Is there any way we can trace the cause of the error??
One more thing, when we manually start this daemon using the script, it starts perfectly.
Can anyone suggest/give any kind of hint as we seem to have confused by now.
So you start some program using some script on some system, and want to know why it fails? I think you're going to have to provide some more information before you can realistically expect any helpful answers.
Ok....I wanted to ask this on a general terms. But if this doesnt help then here it goes.....
The system is Dell 6350 make, with RedHat Linux 2.1 installed on it. The application which we are running on it is UNIFTP. Out startup script ideally should initiate 2 daemons of uniftpd
i> dc & ii> no_dc . But when system boots, it only does start the process for dc and for no_dc (log says) it starts and dies immediately.
Let me know if things are bit clear by now if not plzzz ask me any questions.
# start two daemons for dc and no_dc
print "\nStarting parent process for DC"
date >> $home_dir/uniftpdSTORES.log
$home_dir/uniftpd DC >> $home_dir/uniftpdDC.log 2>&1
date >> $home_dir/uniftpdNODC.log
print "\nStarting parent process for NODC"
$home_dir/uniftpd NODC >> $home_dir/uniftpdNODC.log 2>&1
# terminate a process
#------------------------------------------------------------------
function terminate
{
pid=$(ps -eo pid,command -u $account | grep $1 |grep -v grep | awk '{print $1}')
if [[ $pid = "" ]] ; then
return
fi
print "\nShutting down old version of $1"
print "kill -9 $pid"
kill -9 $pid
}
#------------------------------------------------------------------
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.