bkruse: branch asterisknow r1768 - /branches/asterisknow/scripts/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 2 17:00:14 CDT 2007


Author: bkruse
Date: Fri Nov  2 17:00:13 2007
New Revision: 1768

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1768
Log:
Making seperate bash scripts for misdn and zap

Added:
    branches/asterisknow/scripts/editmisdn.sh   (with props)
Modified:
    branches/asterisknow/scripts/editzap.sh

Added: branches/asterisknow/scripts/editmisdn.sh
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/scripts/editmisdn.sh?view=auto&rev=1768
==============================================================================
--- branches/asterisknow/scripts/editmisdn.sh (added)
+++ branches/asterisknow/scripts/editmisdn.sh Fri Nov  2 17:00:13 2007
@@ -1,0 +1,11 @@
+#!/bin/bash
+
+####################################################################
+####	Copyright Brandon Kruse <bkruse at digium.com> && Digium	####
+####################################################################
+
+# Quick script for applying misdn settings from the GUI.
+
+MISDNCONF="/etc/misdn-init.conf"
+MISDNFILE="/etc/asterisk/applymisdn.conf"
+grep -v "\[general\]" ${MISDNFILE} | grep -v "\;" > ${MISDNCONF}

Propchange: branches/asterisknow/scripts/editmisdn.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/asterisknow/scripts/editzap.sh
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/scripts/editzap.sh?view=diff&rev=1768&r1=1767&r2=1768
==============================================================================
--- branches/asterisknow/scripts/editzap.sh (original)
+++ branches/asterisknow/scripts/editzap.sh Fri Nov  2 17:00:13 2007
@@ -10,44 +10,8 @@
 ZAPATACONF="/etc/asterisk/zapata.conf"
 ZTCFG_OUTPUT="/var/lib/asterisk/static-http/config/ztcfg_output.html"
 FILENAME="/etc/asterisk/applyzap.conf"
-MISDNCONF="/etc/misdn-init.conf"
-MISDNFILE="/etc/asterisk/applymisdn.conf"
-
-case ${1} in
-	changemodes)
-		type=${2}
-		$(for i in `lsmod | grep zap| sed 's/,/ /g'`; do rmmod $i >> /dev/null; done; rmmod zaptel) 
-		case ${type} in
-			e1)
-				t1e1override=0
-				$(modprobe zaptel; modprobe zttranscode; modprobe wct4xxp t1e1override=0; modprobe wcte11xp t1e1override=0; modprobe wct1xxp t1e1override=0; ztcfg)
-			;;
-			t1)
-				t1e1override=1		
-				$(modprobe zaptel; modprobe zttranscode; modprobe wct4xxp t1e1override=1; modprobe wcte11xp t1e1override=1; modprobe wct1xxp t1e1override=1; ztcfg)
-			;;
-			*)
-				error_out "No mode to change specified"
-			;;
-		esac	
-		;;
-	applysettings)	
-		# Split based on ||| delimeter, and apply to zaptel.
-		if [ "${2}" == "misdn" ]
-		then
-			grep -v "\[general\]" ${MISDNFILE} | grep -v "\;" > ${MISDNCONF}
-		else
-			grep -v "\[general\]" ${FILENAME} | grep -v "\;" > ${ZAPCONF} 
-			cp -rf ${ZAPCONF} ${ZAPCONF}.zapscan # save the gui settings!
-			cp -rf ${ZAPATACONF} ${ZAPATACONF}.zapscan # save the user settings
-			zapscan
-		fi
-		;;
-	ztcfg)
-		ztcfg -vv 2> $ZTCFG_OUTPUT
-		;;
-esac
-
-function error_out() {
-	echo "${1}" > ${ZTCFG_OUTPUT}
-}
+grep -v "\[general\]" ${FILENAME} | grep -v "\;" > ${ZAPCONF} 
+cp -rf ${ZAPCONF} ${ZAPCONF}.zapscan # save the gui settings!
+cp -rf ${ZAPATACONF} ${ZAPATACONF}.zapscan # save the user settings
+zapscan
+ztcfg -vv > ${ZTCFG_OUTPUT}




More information about the asterisk-gui-commits mailing list