[ 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 20:46:13 +0200
Philipp Kempgen schrieb:

> I'd love to see something like this in the Makefile:
> 
> install-init: check-root
> 	@if [ -f /etc/debian_version ]; then \
> 		$(INSTALL) -m 755 packaging/init.d/debian $(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 .; fi; \
> 	elif [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
> 		$(INSTALL) -m 755 packaging/init.d/redhat $(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

install-init: check-root
	@if [ -f $(DESTDIR)/etc/debian_version ]; then \
		$(INSTALL) -m 755 packaging/init.d/debian $(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 .; fi; \
	elif [ -f $(DESTDIR)/etc/redhat-release -o -f $(DESTDIR)/etc/fedora-release ]; then \
		$(INSTALL) -m 755 packaging/init.d/redhat $(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
--