Discussion:
Daemon
PV Juliet
2013-11-29 05:56:51 UTC
Permalink
HI All,
I have a c program which run as a daemon in linux. Now i want to start
this program when the system boots up . Can any one tell me simple script
which will run this automatically.

Thanks and Regards
juliet
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Cameron Simpson
2013-11-29 07:10:40 UTC
Permalink
On 29Nov2013 11:26, PV Juliet <***@gmail.com> wrote:
> I have a c program which run as a daemon in linux. Now i want to start
> this program when the system boots up . Can any one tell me simple script
> which will run this automatically.

The easy thing to do it to invoke it from the script /etc/rc.local.
Don't forget to background it if the daemon doesn't do it on its own.

Eg:

/path/to/your/daemon blah blah blah &

Cheers,
--
Cameron Simpson <***@zip.com.au>

The Design View editor of Visual InterDev 6.0 is currently incompatible
with Compatibility Mode, and may not function correctly.
- George Politis <***@research.canon.com.au>, 22apr1999,
quoting http://msdn.microsoft.com/vstudio/technical/ie5.asp

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
awin kumar
2013-11-29 09:38:17 UTC
Permalink
hi,
please create a script file.
means
create shellscript
write inside it
gcc yourprograname.c
and that script file mention
boot up process time
On 11/29/13, PV Juliet <***@gmail.com> wrote:
> HI All,
> I have a c program which run as a daemon in linux. Now i want to start
> this program when the system boots up . Can any one tell me simple script
> which will run this automatically.
>
> Thanks and Regards
> juliet
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


--
senior software engineer
Awin Kumar
ibm india pvt.ltd
bangalore

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Willy Wittesaele
2013-11-29 09:57:34 UTC
Permalink
i don't think you want to compile it at startup
but only run it !

awin kumar schreef op 29-11-13 10:38:
> hi,
> please create a script file.
> means
> create shellscript
> write inside it
> gcc yourprograname.c
> and that script file mention
> boot up process time
> On 11/29/13, PV Juliet <***@gmail.com> wrote:
>> HI All,
>> I have a c program which run as a daemon in linux. Now i want to start
>> this program when the system boots up . Can any one tell me simple script
>> which will run this automatically.
>>
>> Thanks and Regards
>> juliet
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
awin kumar
2013-11-29 10:15:47 UTC
Permalink
yes
path of the file sh and then mention shellscript name

On 11/29/13, Willy Wittesaele <***@skynet.be> wrote:
> i don't think you want to compile it at startup
> but only run it !
>
> awin kumar schreef op 29-11-13 10:38:
>> hi,
>> please create a script file.
>> means
>> create shellscript
>> write inside it
>> gcc yourprograname.c
>> and that script file mention
>> boot up process time
>> On 11/29/13, PV Juliet <***@gmail.com> wrote:
>>> HI All,
>>> I have a c program which run as a daemon in linux. Now i want to
>>> start
>>> this program when the system boots up . Can any one tell me simple
>>> script
>>> which will run this automatically.
>>>
>>> Thanks and Regards
>>> juliet
>>> --
>>> redhat-list mailing list
>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>
>>
>>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


--
senior software engineer
Awin Kumar
ibm india pvt.ltd
bangalore

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
awin kumar
2013-11-29 10:20:20 UTC
Permalink
and that
path sh shellscript name

inside shell script you mention ./object file name
object file
when you complie c program that time you create one object name

On 11/29/13, awin kumar <***@gmail.com> wrote:
> yes
> path of the file sh and then mention shellscript name
>
> On 11/29/13, Willy Wittesaele <***@skynet.be> wrote:
>> i don't think you want to compile it at startup
>> but only run it !
>>
>> awin kumar schreef op 29-11-13 10:38:
>>> hi,
>>> please create a script file.
>>> means
>>> create shellscript
>>> write inside it
>>> gcc yourprograname.c
>>> and that script file mention
>>> boot up process time
>>> On 11/29/13, PV Juliet <***@gmail.com> wrote:
>>>> HI All,
>>>> I have a c program which run as a daemon in linux. Now i want to
>>>> start
>>>> this program when the system boots up . Can any one tell me simple
>>>> script
>>>> which will run this automatically.
>>>>
>>>> Thanks and Regards
>>>> juliet
>>>> --
>>>> redhat-list mailing list
>>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>>
>>>
>>>
>>
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>
>
> --
> senior software engineer
> Awin Kumar
> ibm india pvt.ltd
> bangalore
>


--
senior software engineer
Awin Kumar
ibm india pvt.ltd
bangalore

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Willy Wittesaele
2013-11-29 10:34:10 UTC
Permalink
but the question was : how to start it automatically at boot time ?

awin kumar schreef op 29-11-13 11:20:
> and that
> path sh shellscript name
>
> inside shell script you mention ./object file name
> object file
> when you complie c program that time you create one object name
>
> On 11/29/13, awin kumar <***@gmail.com> wrote:
>> yes
>> path of the file sh and then mention shellscript name
>>
>> On 11/29/13, Willy Wittesaele <***@skynet.be> wrote:
>>> i don't think you want to compile it at startup
>>> but only run it !
>>>
>>> awin kumar schreef op 29-11-13 10:38:
>>>> hi,
>>>> please create a script file.
>>>> means
>>>> create shellscript
>>>> write inside it
>>>> gcc yourprograname.c
>>>> and that script file mention
>>>> boot up process time
>>>> On 11/29/13, PV Juliet <***@gmail.com> wrote:
>>>>> HI All,
>>>>> I have a c program which run as a daemon in linux. Now i want to
>>>>> start
>>>>> this program when the system boots up . Can any one tell me simple
>>>>> script
>>>>> which will run this automatically.
>>>>>
>>>>> Thanks and Regards
>>>>> juliet
>>>>> --
>>>>> redhat-list mailing list
>>>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>>>
>>>>
>>>>
>>>
>>> --
>>> redhat-list mailing list
>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>
>>
>>
>> --
>> senior software engineer
>> Awin Kumar
>> ibm india pvt.ltd
>> bangalore
>>
>
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
mark
2013-11-29 12:34:35 UTC
Permalink
On 11/29/13 05:34, Willy Wittesaele wrote:
> but the question was : how to start it automatically at boot time ?
>
Either put the start and stop script in /etc/rc.local, or clone a start AND
STOP script from one of the simpler ones in /etc/init.d/ and link chkconfig
it on.

If you do the latter, be sure that you consider when to start - you don't
want to start a network-related script before the network is up, for example.

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
awin kumar
2013-11-29 13:29:23 UTC
Permalink
boot time every file will be executed so
check which directory file will executed at booting time


On 11/29/13, Willy Wittesaele <***@skynet.be> wrote:
> but the question was : how to start it automatically at boot time ?
>
> awin kumar schreef op 29-11-13 11:20:
>> and that
>> path sh shellscript name
>>
>> inside shell script you mention ./object file name
>> object file
>> when you complie c program that time you create one object name
>>
>> On 11/29/13, awin kumar <***@gmail.com> wrote:
>>> yes
>>> path of the file sh and then mention shellscript name
>>>
>>> On 11/29/13, Willy Wittesaele <***@skynet.be> wrote:
>>>> i don't think you want to compile it at startup
>>>> but only run it !
>>>>
>>>> awin kumar schreef op 29-11-13 10:38:
>>>>> hi,
>>>>> please create a script file.
>>>>> means
>>>>> create shellscript
>>>>> write inside it
>>>>> gcc yourprograname.c
>>>>> and that script file mention
>>>>> boot up process time
>>>>> On 11/29/13, PV Juliet <***@gmail.com> wrote:
>>>>>> HI All,
>>>>>> I have a c program which run as a daemon in linux. Now i want
>>>>>> to
>>>>>> start
>>>>>> this program when the system boots up . Can any one tell me simple
>>>>>> script
>>>>>> which will run this automatically.
>>>>>>
>>>>>> Thanks and Regards
>>>>>> juliet
>>>>>> --
>>>>>> redhat-list mailing list
>>>>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>>>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> redhat-list mailing list
>>>> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
>>>> https://www.redhat.com/mailman/listinfo/redhat-list
>>>>
>>>
>>>
>>> --
>>> senior software engineer
>>> Awin Kumar
>>> ibm india pvt.ltd
>>> bangalore
>>>
>>
>>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


--
senior software engineer
Awin Kumar
ibm india pvt.ltd
bangalore

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Hakan Koseoglu
2013-11-30 21:52:54 UTC
Permalink
On 29 November 2013 10:34, Willy Wittesaele <***@skynet.be> wrote:

> but the question was : how to start it automatically at boot time ?
>
RTFM:
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-services-chkconfig.html
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Hakan Koseoglu
2013-11-30 22:35:57 UTC
Permalink
Awin,

On 29 November 2013 10:20, awin kumar <***@gmail.com> wrote:
>
> and that
> path sh shellscript name
>
> inside shell script you mention ./object file name
> object file
> when you complie c program that time you create one object name

You do not make any sense.

The correct procedure is to write an init script, you can base it on
any of the /etc/init.d/ scripts, then add it to the startup using
chkconfig --add and chkconfig enable commands. The init script will
contain the priority.

SysV style init scripts are around for a long long time, they're not a
recent invention. See various RHEL manuals to get a start on the
subject (start from here if you like
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Services_and_Daemons.html)

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
PV Juliet
2013-12-03 03:44:28 UTC
Permalink
Hi,
I used the sample init.d script from this site
http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/. My c
program itself a daemon. Can i invoke this daemon from this code ? when i
am giving this stop /status option is not working .It displays wrong pid .
what will be the best way to run this daemon when the system boots up? is
there other way to call this daemon ??
Thanks and Regards
Juliet


On Sun, Dec 1, 2013 at 4:05 AM, Hakan Koseoglu <***@koseoglu.org> wrote:

> Awin,
>
> On 29 November 2013 10:20, awin kumar <***@gmail.com> wrote:
> >
> > and that
> > path sh shellscript name
> >
> > inside shell script you mention ./object file name
> > object file
> > when you complie c program that time you create one object name
>
> You do not make any sense.
>
> The correct procedure is to write an init script, you can base it on
> any of the /etc/init.d/ scripts, then add it to the startup using
> chkconfig --add and chkconfig enable commands. The init script will
> contain the priority.
>
> SysV style init scripts are around for a long long time, they're not a
> recent invention. See various RHEL manuals to get a start on the
> subject (start from here if you like
>
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Services_and_Daemons.html
> )
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
PV Juliet
2013-12-30 10:10:59 UTC
Permalink
Hi All,
I put a simple script in init.d which can start and stop my daemon.
But when i am booting the machine it's not running. I am able to start
manually(service name start) .It works fine . Is it possible to possible to
run it custom level ?
Thanks and Regards
Juliet


On Fri, Nov 29, 2013 at 11:26 AM, PV Juliet <***@gmail.com> wrote:

> HI All,
> I have a c program which run as a daemon in linux. Now i want to start
> this program when the system boots up . Can any one tell me simple script
> which will run this automatically.
>
> Thanks and Regards
> juliet
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
emmanuel segura
2013-12-30 11:00:23 UTC
Permalink
chkconfig


2013/12/30 PV Juliet <***@gmail.com>

> Hi All,
> I put a simple script in init.d which can start and stop my daemon.
> But when i am booting the machine it's not running. I am able to start
> manually(service name start) .It works fine . Is it possible to possible to
> run it custom level ?
> Thanks and Regards
> Juliet
>
>
> On Fri, Nov 29, 2013 at 11:26 AM, PV Juliet <***@gmail.com> wrote:
>
> > HI All,
> > I have a c program which run as a daemon in linux. Now i want to
> start
> > this program when the system boots up . Can any one tell me simple
> script
> > which will run this automatically.
> >
> > Thanks and Regards
> > juliet
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
esta es mi vida e me la vivo hasta que dios quiera
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
p***@ronno.nl
2013-12-30 13:11:58 UTC
Permalink
Using chkconfig the daemon must be recognized, otherwise it will not work.

With the symlinks it is basic init, and works immediately.

Met vriendelijke groet / kind regards,



Ron de Kuijer

ICT specialist

T: 06 36 118 555
F: 030 65 73 903
@: ***@ronno.nl
________________________________________
From: redhat-list-***@redhat.com [redhat-list-***@redhat.com] On Behalf Of emmanuel segura [***@gmail.com]
Sent: Monday, December 30, 2013 12:00
To: General Red Hat Linux discussion list
Subject: Re: Daemon

chkconfig


2013/12/30 PV Juliet <***@gmail.com>

> Hi All,
> I put a simple script in init.d which can start and stop my daemon.
> But when i am booting the machine it's not running. I am able to start
> manually(service name start) .It works fine . Is it possible to possible to
> run it custom level ?
> Thanks and Regards
> Juliet
>
>
> On Fri, Nov 29, 2013 at 11:26 AM, PV Juliet <***@gmail.com> wrote:
>
> > HI All,
> > I have a c program which run as a daemon in linux. Now i want to
> start
> > this program when the system boots up . Can any one tell me simple
> script
> > which will run this automatically.
> >
> > Thanks and Regards
> > juliet
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
esta es mi vida e me la vivo hasta que dios quiera
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Allen Chen
2013-12-30 13:52:56 UTC
Permalink
On 12/30/2013 8:11 AM, ***@ronno.nl wrote:
> Using chkconfig the daemon must be recognized, otherwise it will not work.
>
> With the symlinks it is basic init, and works immediately.
>
> Met vriendelijke groet / kind regards,
>
>
>
> Ron de Kuijer
>
> ICT specialist
>
> T: 06 36 118 555
> F: 030 65 73 903
> @: ***@ronno.nl
> ________________________________________
> From: redhat-list-***@redhat.com [redhat-list-***@redhat.com] On Behalf Of emmanuel segura [***@gmail.com]
> Sent: Monday, December 30, 2013 12:00
> To: General Red Hat Linux discussion list
> Subject: Re: Daemon
>
> chkconfig
>
>
> 2013/12/30 PV Juliet<***@gmail.com>
>
>> Hi All,
>> I put a simple script in init.d which can start and stop my daemon.
>> But when i am booting the machine it's not running. I am able to start
>> manually(service name start) .It works fine . Is it possible to possible to
>> run it custom level ?
>> Thanks and Regards
>> Juliet
>>
If you can manually start it, then just put "service name start" in
/etc/rc.d/rc.local

Allen

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Corey Kovacs
2013-12-30 14:00:42 UTC
Permalink
Look at the other in it scripts. At the top you'll see a line that pertains
to chkconfig. Add a similar line to you script. Then...

chkconfig --add yourscript
chkconfig yourscript on
chkconfig --list yourscript

You should then be able to use the chkconfig system. Hope that helps.

Corey
On Dec 30, 2013 6:56 AM, "Allen Chen" <***@harbourfrontcentre.com> wrote:

> On 12/30/2013 8:11 AM, ***@ronno.nl wrote:
>
>> Using chkconfig the daemon must be recognized, otherwise it will not work.
>>
>> With the symlinks it is basic init, and works immediately.
>>
>> Met vriendelijke groet / kind regards,
>>
>>
>>
>> Ron de Kuijer
>>
>> ICT specialist
>>
>> T: 06 36 118 555
>> F: 030 65 73 903
>> @: ***@ronno.nl
>> ________________________________________
>> From: redhat-list-***@redhat.com [redhat-list-***@redhat.com] On
>> Behalf Of emmanuel segura [***@gmail.com]
>> Sent: Monday, December 30, 2013 12:00
>> To: General Red Hat Linux discussion list
>> Subject: Re: Daemon
>>
>> chkconfig
>>
>>
>> 2013/12/30 PV Juliet<***@gmail.com>
>>
>> Hi All,
>>> I put a simple script in init.d which can start and stop my
>>> daemon.
>>> But when i am booting the machine it's not running. I am able to start
>>> manually(service name start) .It works fine . Is it possible to possible
>>> to
>>> run it custom level ?
>>> Thanks and Regards
>>> Juliet
>>>
>>> If you can manually start it, then just put "service name start" in
> /etc/rc.d/rc.local
>
> Allen
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Abhishek Tyagi
2013-12-31 01:33:18 UTC
Permalink
chkconfig daemon-name-script on -- chkconfig is a permanent on the service
every reboot the system automatic service start


On Mon, Dec 30, 2013 at 7:30 PM, Corey Kovacs <***@gmail.com>wrote:

> Look at the other in it scripts. At the top you'll see a line that pertains
> to chkconfig. Add a similar line to you script. Then...
>
> chkconfig --add yourscript
> chkconfig yourscript on
> chkconfig --list yourscript
>
> You should then be able to use the chkconfig system. Hope that helps.
>
> Corey
> On Dec 30, 2013 6:56 AM, "Allen Chen" <***@harbourfrontcentre.com>
> wrote:
>
> > On 12/30/2013 8:11 AM, ***@ronno.nl wrote:
> >
> >> Using chkconfig the daemon must be recognized, otherwise it will not
> work.
> >>
> >> With the symlinks it is basic init, and works immediately.
> >>
> >> Met vriendelijke groet / kind regards,
> >>
> >>
> >>
> >> Ron de Kuijer
> >>
> >> ICT specialist
> >>
> >> T: 06 36 118 555
> >> F: 030 65 73 903
> >> @: ***@ronno.nl
> >> ________________________________________
> >> From: redhat-list-***@redhat.com [redhat-list-***@redhat.com]
> On
> >> Behalf Of emmanuel segura [***@gmail.com]
> >> Sent: Monday, December 30, 2013 12:00
> >> To: General Red Hat Linux discussion list
> >> Subject: Re: Daemon
> >>
> >> chkconfig
> >>
> >>
> >> 2013/12/30 PV Juliet<***@gmail.com>
> >>
> >> Hi All,
> >>> I put a simple script in init.d which can start and stop my
> >>> daemon.
> >>> But when i am booting the machine it's not running. I am able to start
> >>> manually(service name start) .It works fine . Is it possible to
> possible
> >>> to
> >>> run it custom level ?
> >>> Thanks and Regards
> >>> Juliet
> >>>
> >>> If you can manually start it, then just put "service name start" in
> > /etc/rc.d/rc.local
> >
> > Allen
> >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
Abhishek tyagi
***@gmail.com
09873924446
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Sanjay Chakraborty
2014-01-06 02:32:50 UTC
Permalink
Beside chkconfig you can add your can add in /etc/rc.local as other option.


On Mon, Dec 30, 2013 at 8:33 PM, Abhishek Tyagi <***@gmail.com
> wrote:

> chkconfig daemon-name-script on -- chkconfig is a permanent on the service
> every reboot the system automatic service start
>
>
> On Mon, Dec 30, 2013 at 7:30 PM, Corey Kovacs <***@gmail.com
> >wrote:
>
> > Look at the other in it scripts. At the top you'll see a line that
> pertains
> > to chkconfig. Add a similar line to you script. Then...
> >
> > chkconfig --add yourscript
> > chkconfig yourscript on
> > chkconfig --list yourscript
> >
> > You should then be able to use the chkconfig system. Hope that helps.
> >
> > Corey
> > On Dec 30, 2013 6:56 AM, "Allen Chen" <***@harbourfrontcentre.com>
> > wrote:
> >
> > > On 12/30/2013 8:11 AM, ***@ronno.nl wrote:
> > >
> > >> Using chkconfig the daemon must be recognized, otherwise it will not
> > work.
> > >>
> > >> With the symlinks it is basic init, and works immediately.
> > >>
> > >> Met vriendelijke groet / kind regards,
> > >>
> > >>
> > >>
> > >> Ron de Kuijer
> > >>
> > >> ICT specialist
> > >>
> > >> T: 06 36 118 555
> > >> F: 030 65 73 903
> > >> @: ***@ronno.nl
> > >> ________________________________________
> > >> From: redhat-list-***@redhat.com [redhat-list-***@redhat.com]
> > On
> > >> Behalf Of emmanuel segura [***@gmail.com]
> > >> Sent: Monday, December 30, 2013 12:00
> > >> To: General Red Hat Linux discussion list
> > >> Subject: Re: Daemon
> > >>
> > >> chkconfig
> > >>
> > >>
> > >> 2013/12/30 PV Juliet<***@gmail.com>
> > >>
> > >> Hi All,
> > >>> I put a simple script in init.d which can start and stop my
> > >>> daemon.
> > >>> But when i am booting the machine it's not running. I am able to
> start
> > >>> manually(service name start) .It works fine . Is it possible to
> > possible
> > >>> to
> > >>> run it custom level ?
> > >>> Thanks and Regards
> > >>> Juliet
> > >>>
> > >>> If you can manually start it, then just put "service name start" in
> > > /etc/rc.d/rc.local
> > >
> > > Allen
> > >
> > > --
> > > redhat-list mailing list
> > > unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
>
>
>
> --
> Abhishek tyagi
> ***@gmail.com
> 09873924446
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
Regards.
Sanjay Chakraborty
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
p***@ronno.nl
2013-12-30 11:05:24 UTC
Permalink
Hi Juliet,

When you put a start/stop script in init.d and want to run it by the system at boottime.

Then you need to create a link at the running init-level in "/etc/rc?.d/" to the init.d start/stop script.

So, if your system is running init-level 3 (`runlevel` or "/etc/inittab/{default}) then create a symlink in /etc/rc3.d :
# cd /etc/rc3.d
# ln -s /etc/init.d/{daemon-name-script} S99'daemon-name' (S=Start-script, 99=start-number in the row (99 is the last number, can also be another number if necessary))

You can do the same with the stop-part, those are the K-symlinks (Kill) in "/etc/rc3.d"


Met vriendelijke groet / kind regards,



Ron de Kuijer

ICT specialist

T: 06 36 118 555
F: 030 65 73 903
@: ***@ronno.nl
________________________________________
From: redhat-list-***@redhat.com [redhat-list-***@redhat.com] On Behalf Of PV Juliet [***@gmail.com]
Sent: Monday, December 30, 2013 11:10
To: General Red Hat Linux discussion list
Subject: Re: Daemon

Hi All,
I put a simple script in init.d which can start and stop my daemon.
But when i am booting the machine it's not running. I am able to start
manually(service name start) .It works fine . Is it possible to possible to
run it custom level ?
Thanks and Regards
Juliet


On Fri, Nov 29, 2013 at 11:26 AM, PV Juliet <***@gmail.com> wrote:

> HI All,
> I have a c program which run as a daemon in linux. Now i want to start
> this program when the system boots up . Can any one tell me simple script
> which will run this automatically.
>
> Thanks and Regards
> juliet
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Loading...