[Pkg-voip-commits] r6009 - in /kamailio/trunk/debian: kamailio.default kamailio.dirs kamailio.init kamailio.postinst
jblache at alioth.debian.org
jblache at alioth.debian.org
Wed Jul 30 12:35:32 UTC 2008
Author: jblache
Date: Wed Jul 30 12:35:32 2008
New Revision: 6009
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6009
Log:
More renames.
Modified:
kamailio/trunk/debian/kamailio.default
kamailio/trunk/debian/kamailio.dirs
kamailio/trunk/debian/kamailio.init
kamailio/trunk/debian/kamailio.postinst
Modified: kamailio/trunk/debian/kamailio.default
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.default?rev=6009&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.default (original)
+++ kamailio/trunk/debian/kamailio.default Wed Jul 30 12:35:32 2008
@@ -2,14 +2,14 @@
# Kamailio startup options
#
-# Set to yes to enable openser, once configured properly.
-RUN_OPENSER=no
+# Set to yes to enable kamailio, once configured properly.
+RUN_KAMAILIO=no
# User to run as
-USER=openser
+USER=kamailio
# Group to run as
-GROUP=openser
+GROUP=kamailio
# Amount of memory to allocate for the running Kamailio server (in Mb)
MEMORY=64
Modified: kamailio/trunk/debian/kamailio.dirs
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.dirs?rev=6009&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.dirs (original)
+++ kamailio/trunk/debian/kamailio.dirs Wed Jul 30 12:35:32 2008
@@ -1,2 +1,2 @@
-var/run/openser
+var/run/kamailio
Modified: kamailio/trunk/debian/kamailio.init
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.init?rev=6009&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.init (original)
+++ kamailio/trunk/debian/kamailio.init Wed Jul 30 12:35:32 2008
@@ -1,7 +1,7 @@
#! /bin/sh
#
### BEGIN INIT INFO
-# Provides: openser
+# Provides: kamailio
# Required-Start: $syslog $network $local_fs $time
# Should-Start: $named slapd mysql postgresql snmpd radiusd
# Should-Stop: $named slapd mysql postgresql snmpd radiusd
@@ -13,27 +13,27 @@
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/openser
-NAME=openser
-DESC=openser
-HOMEDIR=/var/run/openser
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC=Kamailio SIP server
+HOMEDIR=/var/run/kamailio
PIDFILE=$HOMEDIR/$NAME.pid
-DEFAULTS=/etc/default/openser
-RUN_OPENSER=no
+DEFAULTS=/etc/default/kamailio
+RUN_KAMAILIO=no
-# Do not start openser if fork=no is set in the config file
+# Do not start kamailio if fork=no is set in the config file
# otherwise the boot process will just stop
check_fork ()
{
- if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/openser/openser.cfg; then
- echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/openser debug instead"
+ if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/kamailio/kamailio.cfg; then
+ echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
exit 0
fi
}
-check_openser_config ()
+check_kamailio_config ()
{
- # Check if openser configuration is valid before starting the server
+ # Check if kamailio configuration is valid before starting the server
set +e
out=$($DAEMON -c 2>&1 > /dev/null)
retcode=$?
@@ -51,15 +51,15 @@
{
# Create a radius sequence file to be used by the radius client if
# radius accounting is enabled. This is needed to avoid any issue
- # with the file not being writable if openser first starts as user
- # root because DUMP_CORE is enabled and creates this file as user
- # root and then later it switches back to user openser and cannot
- # write to the file. If the file exists before openser starts, it
- # won't change it's ownership and will be writable for both root
- # and openser, no matter what options are chosen at install time
- RADIUS_SEQ_FILE=/var/run/openser/openser_radius.seq
- if [ -d /var/run/openser ]; then
- chown ${USER}:${GROUP} /var/run/openser
+ # with the file not being writable if kamailio first starts as
+ # root because DUMP_CORE is enabled and creates this file as
+ # root, then later cannot write to the file once it switched to
+ # the kamailio user. If the file exists before kamailio starts, it
+ # won't change its ownership and it will be writable for both root
+ # and kamailio, no matter what options are chosen at install time
+ RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+ if [ -d /var/run/kamailio ]; then
+ chown ${USER}:${GROUP} /var/run/kamailio
if [ ! -f $RADIUS_SEQ_FILE ]; then
touch $RADIUS_SEQ_FILE
@@ -77,16 +77,16 @@
. $DEFAULTS || true
fi
-if [ "$RUN_OPENSER" != "yes" ]; then
- echo "Kamailio not yet configured. Edit /etc/default/openser first."
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+ echo "Kamailio not yet configured. Edit /etc/default/kamailio first."
exit 0
fi
set -e
MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
-[ -z "$USER" ] && USER=openser
-[ -z "$GROUP" ] && GROUP=openser
+[ -z "$USER" ] && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
[ $MEMORY -le 0 ] && MEMORY=32
if test "$DUMP_CORE" = "yes" ; then
@@ -103,7 +103,7 @@
case "$1" in
start|debug)
- check_openser_config
+ check_kamailio_config
create_radius_seqfile
if [ "$1" != "debug" ]; then
@@ -122,7 +122,7 @@
echo "."
;;
restart|force-reload)
- check_openser_config
+ check_kamailio_config
create_radius_seqfile
echo -n "Restarting $DESC: $NAME"
Modified: kamailio/trunk/debian/kamailio.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.postinst?rev=6009&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.postinst (original)
+++ kamailio/trunk/debian/kamailio.postinst Wed Jul 30 12:35:32 2008
@@ -1,36 +1,12 @@
#! /bin/sh
-#
-# $Id: openser.postinst,v 1.1.2.4 2006/02/03 18:28:19 dan_pascu Exp $
-
-PKG=openser
-DEFAULTS=/etc/default/openser
-HOMEDIR=/var/run/openser
set -e
-
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-# quoting from the policy:
-# Any necessary prompting should almost always be confined to the
-# post-installation script, and should be protected with a conditional
-# so that unnecessary prompting doesn't happen if a package's
-# installation fails and the `postinst' is called with `abort-upgrade',
-# `abort-remove' or `abort-deconfigure'.
case "$1" in
configure)
adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio SIP Server" \
- --home $HOMEDIR openser || true
+ --home $HOMEDIR kamailio || true
;;
More information about the Pkg-voip-commits
mailing list