FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 02-05-2011, 02:54 PM
Abhilash abhi
 
Default How to add a perl script as a system startup daemon in redhat

Hello,

I have a perlscript. I want to run that script at system startup(as a
startup daemon) in redhat.
i have put that script in /etc/init.d and try adding that to chkconfig using
[root@localhost init.d]# chkconfig --add changehttpadress
service changehttpadress does not support chkconfig
but that wont work since its a perl script(not bash).

So how can i run that in system startup. Need to add any daemon modules in
the perl script so that chkconfig will detect that as a valid service ?

Any suggestions and solutions is highly appreciated. Thanks in advance.

--

Regards,
Abhilash
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 02-05-2011, 03:07 PM
"Kyle O'Donnell"
 
Default How to add a perl script as a system startup daemon in redhat

use a shell script as a wrapper for the perl script?

On Sat, Feb 5, 2011 at 10:54 AM, Abhilash abhi <abhilashck72@gmail.com>wrote:

> Hello,
>
> I have a perlscript. I want to run that script at system startup(as a
> startup daemon) in redhat.
> i have put that script in /etc/init.d and try adding that to chkconfig
> using
> [root@localhost init.d]# chkconfig --add changehttpadress
> service changehttpadress does not support chkconfig
> but that wont work since its a perl script(not bash).
>
> So how can i run that in system startup. Need to add any daemon modules in
> the perl script so that chkconfig will detect that as a valid service ?
>
> Any suggestions and solutions is highly appreciated. Thanks in advance.
>
> --
>
> Regards,
> Abhilash
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 02-05-2011, 03:21 PM
"Carl T. Miller"
 
Default How to add a perl script as a system startup daemon in redhat

Abhilash abhi wrote:
> I have a perlscript. I want to run that script at system startup(as a
> startup daemon) in redhat.
> i have put that script in /etc/init.d and try adding that to chkconfig
> using
> [root@localhost init.d]# chkconfig --add changehttpadress
> service changehttpadress does not support chkconfig


Do you have comments in the script that are similar to
these from atd? These are required to make chkconfig work.

# chkconfig: 345 95 5
# description: Runs commands scheduled by the at command at the time
# specified when at was run, and runs batch commands when the load
# average is low enough.
# processname: atd

Note that you also have to create a file in /var/lock/subsystem
if you want the service to stop gracefully at shutdown. For
example the atd script uses this: touch /var/lock/subsys/atd

I'll be interested to know if these two additions to a perl
script make it start and stop as expected.

c



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 02-06-2011, 04:16 AM
Abhilash abhi
 
Default How to add a perl script as a system startup daemon in redhat

Hi Kyle,

Can you please tellme how to do this in detail.

On Sat, Feb 5, 2011 at 9:37 PM, Kyle O'Donnell <redhat@isprime.org> wrote:

> use a shell script as a wrapper for the perl script?
>
> On Sat, Feb 5, 2011 at 10:54 AM, Abhilash abhi <abhilashck72@gmail.com
> >wrote:
>
> > Hello,
> >
> > I have a perlscript. I want to run that script at system startup(as a
> > startup daemon) in redhat.
> > i have put that script in /etc/init.d and try adding that to chkconfig
> > using
> > [root@localhost init.d]# chkconfig --add changehttpadress
> > service changehttpadress does not support chkconfig
> > but that wont work since its a perl script(not bash).
> >
> > So how can i run that in system startup. Need to add any daemon modules
> in
> > the perl script so that chkconfig will detect that as a valid service ?
> >
> > Any suggestions and solutions is highly appreciated. Thanks in advance.
> >
> > --
> >
> > Regards,
> > Abhilash
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--

Regards,
Abhilash
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 12:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org