Re: Creating a user defined service in Cent os

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, May 24, 2010 at 07:29:21PM +0530, Chaitanya Yanamadala wrote:

> hai
>  i have a perl script which will automatically check for the existing files
> and then ftp them to a server, this one runs in a loop until i kill it, now
> what i wants is i want to make this as a service so that it can keep on
> running until i kill the service. so does any one have an idea how to do
> this??

Has anyone syggested using rsync instead of a Perl script?
That is designed just for things like this and works well
and might be more secure than the Perl script.

Or you could put use rsync in your Perl script.  

You will need to create a little binary to invoke the Perl script.
Then create an rd.d type script that takes a 'start' and 'stop'
put it in and run it with a 'start' parameter.   Give the startup 
script a 'stop' when you want to quite.

Look at the stuff in init.d, etc such as apachectl for hints.
You probably don't need anything as elaborate as that for
the start/stop script, but it is a good example.

////jerry


> 
> Chaitanya

> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux