LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2009, 04:23 AM   #1
elthox
Member
 
Registered: Oct 2006
Posts: 41

Rep: Reputation: 15
Cannot start deamon from init.d


Hi guys,

I have a executable file put in the /etc/init.d, that I want it to be run every time the machines reboots. Also I made a link from the /etc/rc3.d like this:

ls -s ln -s ../init.d/kannel kannel

But after I reboot the machine there is no process running.

The script is run properly when i execute it manually.

Thanks
 
Old 03-09-2009, 04:46 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by elthox View Post
ls -s ln -s ../init.d/kannel kannel
Ummm ... is that really what you did? From where,
and what was the result?
 
Old 03-09-2009, 05:04 AM   #3
elthox
Member
 
Registered: Oct 2006
Posts: 41

Original Poster
Rep: Reputation: 15
Sorry for the wrong paste
In fact it was:
ln -s ../init.d/kannel kannel

under the /etc/rc3.d and I`m running Redhat RHEL5

Thanks
 
Old 03-09-2009, 05:26 AM   #4
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Always back to Fedora
Posts: 263

Rep: Reputation: 52
If you look in /etc/rc3.d you will see that all links start with either K (for kill) or S (for start) - you need to do this as well if you want do do all the Sys V stuff.

Did you look at any of the other scripts in /etc/init.d and see how they are set up? You will need to do the same for your script.

Otherwise, usually you could simply put your script in /etc/rc.local and it will be run after all other scripts have run at startup.
 
Old 03-09-2009, 05:47 AM   #5
elthox
Member
 
Registered: Oct 2006
Posts: 41

Original Poster
Rep: Reputation: 15
I edited the rc.local file, putting in the line
/etc/init.d/kannel
But it didnt work, no process attached while i do ps -ef

What can be the reason?
 
Old 03-09-2009, 06:09 AM   #6
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
are you facing any issues manually start the service (/etc/rc.d/init.d/kannel start)?? if not the services want it to be run every reboot
#runlevel , it will give current runlevel
#chkconfig --list | grep kannel, check the output if all the runlevel off, you will have to turn on it.
#chkconfig --level 2345 kannel on (makesure it on which runlevels this services wants to be turn on every reboot)
 
Old 03-09-2009, 06:44 AM   #7
elthox
Member
 
Registered: Oct 2006
Posts: 41

Original Poster
Rep: Reputation: 15
Thanks Kirukan

Now it is started after reboot


root 4853 1 0 22:43 ? 00:00:00 /usr/local/kannel/sbin/bearerbox --daemonize --parachute --user root --pid-file /var/run/kannel/bearerbox.pid -- /usr/local/kannel/smskannel.conf
root 4854 4853 0 22:43 ? 00:00:00 /usr/local/kannel/sbin/bearerbox --daemonize --parachute --user root --pid-file /var/run/kannel/bearerbox.pid -- /usr/local/kannel/smskannel.conf

Let me ask something please, why there are two identical processes with different pid?

Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to start the dhcpd deamon in redhat raghuvamsi Linux - General 5 09-18-2008 03:02 AM
[SOLVED] etc/init.d/sysklogd start doesn't do anything! SaRS AeOL Linux - Newbie 1 05-28-2008 08:09 PM
How to install default start/stop script links for deamon directoryserver? kim0 Linux - Newbie 0 12-25-2007 07:37 AM
deamon start at boot freeBSD kernelvn *BSD 6 06-04-2005 02:17 PM
how to start up ssh deamon bennethos Linux - Newbie 2 10-21-2003 09:56 AM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration