[Pkg-voip-commits] r1979 - asterisk/trunk/debian

Tzafrir Cohen tzafrir-guest at costa.debian.org
Thu Jun 29 07:44:12 UTC 2006


Author: tzafrir-guest
Date: 2006-06-29 07:44:10 +0000 (Thu, 29 Jun 2006)
New Revision: 1979

Added:
   asterisk/trunk/debian/asterisk.postrm
   asterisk/trunk/debian/asterisk_fix
Removed:
   asterisk/trunk/debian/asterisk-bristuff.postinst
   asterisk/trunk/debian/asterisk-bristuff.postrm
   asterisk/trunk/debian/asterisk-classic.postinst
   asterisk/trunk/debian/asterisk-classic.postrm
Modified:
   asterisk/trunk/debian/asterisk-config.postinst
Log:
Moving all scripts and such to asterisk and asterisk-config

Deleted: asterisk/trunk/debian/asterisk-bristuff.postinst
===================================================================
--- asterisk/trunk/debian/asterisk-bristuff.postinst	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk-bristuff.postinst	2006-06-29 07:44:10 UTC (rev 1979)
@@ -1,62 +0,0 @@
-#! /bin/sh
-
-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>
-
-case "$1" in
-    configure)
-
-	if (getent passwd asterisk >/dev/null);then
-		if [ "`getent passwd asterisk|awk -F: '{print $6}'`" = "/var/run/asterisk" ];then
-			usermod -d /var/lib/asterisk asterisk
-		fi
-	else
-	    	adduser --system --group --home /var/lib/asterisk --gecos "Asterisk PBX daemon" asterisk
-		adduser asterisk audio 
-		adduser asterisk dialout
-	fi
-	if (groups asterisk | grep -w -q -v asterisk); then
-		adduser asterisk dialout
-	fi
-
-	for cdrdir in csv custom; do 
-		if [ ! -d /var/log/asterisk/cdr-$cdrdir ];then
-			mkdir -p /var/log/asterisk/cdr-$cdrdir
-		fi
-	done
-	test -d /var/log/asterisk/ || mkdir -p /var/log/asterisk/
-	test -d /var/spool/asterisk/voicemail || mkdir -p /var/spool/asterisk/voicemail
-	test -d /var/spool/asterisk/meetme || mkdir -p /var/spool/asterisk/meetme
-	test -d /var/lib/asterisk || mkdir -p /var/lib/asterisk
-	test -d /etc/asterisk || mkdir -p /etc/asterisk
-	chown -R asterisk.asterisk /var/log/asterisk /var/run/asterisk \
-		/var/spool/asterisk /var/lib/asterisk /etc/asterisk 
-	chmod 0660 /etc/asterisk/*.conf
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-

Deleted: asterisk/trunk/debian/asterisk-bristuff.postrm
===================================================================
--- asterisk/trunk/debian/asterisk-bristuff.postrm	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk-bristuff.postrm	2006-06-29 07:44:10 UTC (rev 1979)
@@ -1,9 +0,0 @@
-#! /bin/sh -e
-
-if [ "$1" = purge ]; then
-        userdel -r asterisk 2>/dev/null || true
-        rm -fR /var/log/asterisk
-
-fi
-
-#DEBHELPER#

Deleted: asterisk/trunk/debian/asterisk-classic.postinst
===================================================================
--- asterisk/trunk/debian/asterisk-classic.postinst	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk-classic.postinst	2006-06-29 07:44:10 UTC (rev 1979)
@@ -1,62 +0,0 @@
-#! /bin/sh
-
-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>
-
-case "$1" in
-    configure)
-
-	if (getent passwd asterisk >/dev/null);then
-		if [ "`getent passwd asterisk|awk -F: '{print $6}'`" = "/var/run/asterisk" ];then
-			usermod -d /var/lib/asterisk asterisk
-		fi
-	else
-	    	adduser --system --group --home /var/lib/asterisk --gecos "Asterisk PBX daemon" asterisk
-		adduser asterisk audio 
-		adduser asterisk dialout
-	fi
-	if (groups asterisk | grep -w -q -v asterisk); then
-		adduser asterisk dialout
-	fi
-
-	for cdrdir in csv custom; do 
-		if [ ! -d /var/log/asterisk/cdr-$cdrdir ];then
-			mkdir -p /var/log/asterisk/cdr-$cdrdir
-		fi
-	done
-	test -d /var/log/asterisk/ || mkdir -p /var/log/asterisk/
-	test -d /var/spool/asterisk/voicemail || mkdir -p /var/spool/asterisk/voicemail
-	test -d /var/spool/asterisk/meetme || mkdir -p /var/spool/asterisk/meetme
-	test -d /var/lib/asterisk || mkdir -p /var/lib/asterisk
-	test -d /etc/asterisk || mkdir -p /etc/asterisk
-	chown -R asterisk.asterisk /var/log/asterisk /var/run/asterisk \
-		/var/spool/asterisk /var/lib/asterisk /etc/asterisk 
-	chmod 0660 /etc/asterisk/*.conf
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-

Deleted: asterisk/trunk/debian/asterisk-classic.postrm
===================================================================
--- asterisk/trunk/debian/asterisk-classic.postrm	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk-classic.postrm	2006-06-29 07:44:10 UTC (rev 1979)
@@ -1,9 +0,0 @@
-#! /bin/sh -e
-
-if [ "$1" = purge ]; then
-        userdel -r asterisk 2>/dev/null || true
-        rm -fR /var/log/asterisk
-
-fi
-
-#DEBHELPER#

Modified: asterisk/trunk/debian/asterisk-config.postinst
===================================================================
--- asterisk/trunk/debian/asterisk-config.postinst	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk-config.postinst	2006-06-29 07:44:10 UTC (rev 1979)
@@ -13,26 +13,9 @@
 
 case "$1" in
     configure)
-	if (getent passwd asterisk >/dev/null);then
-		if [ "`getent passwd asterisk|awk -F: '{print $6}'`" = "/var/run/asterisk" ];then
-			usermod -d /var/lib/asterisk asterisk
-		fi
-	else
-	    	adduser --system --group --home /var/lib/asterisk --gecos "Asterisk PBX daemon" asterisk
-		adduser asterisk audio 
-		adduser asterisk dialout
+	if [ -x /usr/share/asterisk/bin/asterisk_fix ]; then
+		/usr/share/asterisk/bin/asterisk_fix
 	fi
-	if (groups asterisk | grep -w -q -v asterisk); then
-		adduser asterisk dialout
-	fi
-
-	test -d /var/log/asterisk || mkdir -p /var/log/asterisk
-	test -d /var/lib/asterisk || mkdir -p /var/lib/asterisk
-	test -d /etc/asterisk || mkdir -p /etc/asterisk
-	test -d /var/spool/asterisk/ || mkdir -p /var/spool/asterisk/
-	chown -R asterisk.asterisk /var/log/asterisk /var/run/asterisk \
-		/var/spool/asterisk /var/lib/asterisk /etc/asterisk 
-	chmod 0660 /etc/asterisk/*.conf
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Added: asterisk/trunk/debian/asterisk.postrm
===================================================================
--- asterisk/trunk/debian/asterisk.postrm	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk.postrm	2006-06-29 07:44:10 UTC (rev 1979)
@@ -0,0 +1,9 @@
+#! /bin/sh -e
+
+if [ "$1" = purge ]; then
+        userdel -r asterisk 2>/dev/null || true
+        rm -fR /var/log/asterisk
+
+fi
+
+#DEBHELPER#

Added: asterisk/trunk/debian/asterisk_fix
===================================================================
--- asterisk/trunk/debian/asterisk_fix	2006-06-29 07:41:35 UTC (rev 1978)
+++ asterisk/trunk/debian/asterisk_fix	2006-06-29 07:44:10 UTC (rev 1979)
@@ -0,0 +1,44 @@
+#/bin/sh 
+
+if (getent passwd asterisk >/dev/null);then
+        if [ "`getent passwd asterisk|awk -F: '{print $6}'`" = "/var/run/asterisk" ];then
+	            usermod -d /var/lib/asterisk asterisk
+        fi
+else
+        adduser --system --group --home /var/lib/asterisk --gecos "Asterisk PBX daemon" asterisk
+        adduser asterisk audio
+        adduser asterisk dialout
+fi
+
+if (groups asterisk | grep -w -q -v asterisk); then
+        adduser asterisk dialout
+fi
+
+
+test -d /var/log/asterisk || mkdir -p /var/log/asterisk
+test -d /var/lib/asterisk || mkdir -p /var/lib/asterisk
+test -d /etc/asterisk || mkdir -p /etc/asterisk
+test -d /var/spool/asterisk/ || mkdir -p /var/spool/asterisk/
+chown -R asterisk.asterisk \
+        /var/log/asterisk \
+        /var/run/asterisk \
+        /var/spool/asterisk \ 
+        /var/lib/asterisk \
+        /etc/asterisk
+chmod 0660 /etc/asterisk/*.conf
+
+
+####################################
+# TODO:
+#
+# the real setup should be :
+#   if asterisk is not running - start it
+#   otherwise reload. 
+#   reload may fail, but start should not (it will be run on fist install only)
+#
+# for simplicity, we just restart it by force right now.
+
+if [ -x /etc/init.d/asterisk ]; then
+##        /etc/init.d/asterisk reload || true
+        /etc/init.d/asterisk restart
+fi


Property changes on: asterisk/trunk/debian/asterisk_fix
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-voip-commits mailing list