[ previous ] [ next ] [ threads ]
 To :  Yate mailing list <yate@v...>
 From :  Philipp Kempgen <philipp.kempgen@a...>
 Subject :  Re: [yate] init.d
 Date :  Tue, 02 Sep 2008 22:42:00 +0200
Philipp Kempgen schrieb:
> Diana Cionoiu schrieb:
>> That's because we have no idea how to do them for other distro's. :)
> 
>> On Mon, 1 Sep 2008, Philipp Kempgen wrote:
>> 
>>> What do you think about providing init.d scripts in the packing
>>> directory or in contrib?
>>> (I know it's the job of the package maintener, that's why I say
>>> contrib.)
>>> I've seen packing/yate.init but that's RedHat-style only.
> 
> Here's what I've come up with
> http://www2.amooma.com/philipp/yate.init.debian.txt

Improved version:
http://www2.amooma.com/philipp/yate/packaging/init.d/

> 
> I'd love to see something like this in the Makefile:

install-init: check-root
	@if [ -f $(DESTDIR)/etc/debian_version ]; then \
		$(INSTALL) -m 755 packaging/init.d/debian.init $(DESTDIR)/etc/init.d/yate; \
		if [ -z "$(DESTDIR)" ]; then \
			/usr/sbin/update-rc.d yate start 80 2 3 4 5 . stop 20 0 1 6 .; \
			$(INSTALL) -m 644 packaging/init.d/debian.init.defaults $(DESTDIR)/etc/default/yate; \
		fi; \
	elif [ -f $(DESTDIR)/etc/redhat-release -o -f $(DESTDIR)/etc/fedora-release ]; then \
		$(INSTALL) -m 755 packaging/init.d/redhat.init $(DESTDIR)/etc/init.d/yate; \
		if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add yate; fi; \
	else \
		echo "Sorry, we do not have an init script for your distribution."; \
	fi


   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
--