Back on-list:

Looks like you're developing for a Red Hat-based distro; I know the
rpmdevtools package in Fedora contains /etc/rpmdevtools/template.init file
that is a great start.  Also check out the related wiki page:

http://fedoraproject.org/wiki/FCNewInit/Initscripts

-Doug

On 10/19/2011 10:04 AM, Dan White wrote:
> That looks interesting, but I think I would prefer to make a script to put 
> into /etc/init.d so that I can use "service foo start|stop" and chkconfig
> 
> Any examples/recipes like that available ?
> 
> “Sometimes I think the surest sign that intelligent life exists elsewhere in 
> the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin & Hobbes)
> 
> ----- Doug Warner <d...@warner.fm> wrote:
>> Creating your own init script if one is not provided is definitely the best
>> approach; but failing that, you can still use the "service" resource as a
>> glorified exec; I've done this w/ my arpwatch daemon on redhat boxes since
>> it's otherwise difficult to run multiple arpwatch daemons:
>>
>> ##
>> # maintains an arpwatch daemon for a specified interface
>> #
>> # $name: name of interface to monitor
>> #
>> define arpwatch::interface {
>>   $interface = $name
>>
>>   service { "arpwatch.${interface}":
>>     provider => "base",
>>     ensure => running,
>>     start => "/usr/sbin/arpwatch -i ${interface} -u arpwatch -e root -s 'root
>> (Arpwat
>> ch)'",
>>     stop => "/usr/bin/pkill -f arpwatch.*${interface}",
>>     status => "/usr/bin/pgrep -f arpwatch.*${interface}",
>>     require => Class["arpwatch"],
>>   }
>> }
>>
>> -Doug
>>
>> On 10/18/2011 04:21 PM, Dan White wrote:
>>> Are there any exapmples out there that show an intelligent way to do this ?
>>>
>>> My searches are not turning up anything useful
>>
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to