Module: sip-router
Branch: master
Commit: 7ec7231a86bc895b22a8ae5b617764b6171ac6d4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7ec7231…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Apr 21 21:16:49 2013 +0200
Makefile: added target to install init.d script on debian
---
Makefile | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 330c06e..0bde59c 100644
--- a/Makefile
+++ b/Makefile
@@ -1018,6 +1018,26 @@ clean_modules_cfg clean-modules-cfg:
.PHONY: pure
pure: maintainer-clean
+.PHONY: install_initd_debian install-initd-debian
+install_initd_debian install-initd-debian:
+ sed -e "s#DAEMON=/usr/sbin/kamailio#DAEMON=$(bin_prefix)/$(bin_dir)$(NAME)#g"
\
+ -e "s#NAME=kamailio#NAME=$(NAME)#g" \
+ -e "s#DESC=Kamailio#DESC=$(NAME)#g" \
+ -e "s#HOMEDIR=/var/run/kamailio#HOMEDIR=/var/run/$(NAME)#g" \
+ -e "s#DEFAULTS=/etc/default/kamailio#DEFAULTS=/etc/default/$(NAME)#g" \
+ -e
"s#CFGFILE=/etc/kamailio/kamailio.cfg#CFGFILE=$(cfg_prefix)/$(cfg_dir)$(NAME).cfg#g"
\
+ < pkg/kamailio/deb/debian/kamailio.init \
+ > /etc/init.d/$(NAME)
+ chmod +x /etc/init.d/$(NAME)
+ sed -e "s#RUN_KAMAILIO=no#RUN_KAMAILIO=yes#g" \
+ < pkg/kamailio/debian/kamailio.default \
+ > /etc/default/$(NAME)
+ mkdir -p /var/run/$(NAME)
+ adduser --quiet --system --group --disabled-password \
+ --shell /bin/false --gecos "$(NAME)" \
+ --home /var/run/$(NAME) $(NAME)
+ chown $(NAME):$(NAME) /var/run/$(NAME)
+
.PHONY: dbschema
dbschema:
-@echo "Build database schemas"