#!/bin/bash
# include modpatch function
. ${include_modpatch}
# is no ISTN Terminal equiptment "TE"
DIRII="usr/www/${HTML}/de/fon_config"
if [ -f "$1"/$DIRII/fon_config_msn.html ]; then
#remove auswal Analog / ISDN
#.76 variante
if `cat $1/${DIRII}/fon_config_msn.html | grep -q 'Isdn' ` ; then
echo2 " -- remove ISDN option from Festnetzmenue"
sed -i -e "/uiIsdn/,/<\/div>/d" "$1"/${DIRII}/fon_config_msn.html
sed -i -e "/die Art Ihres Festnetzanschlusses aus/d" "$1"/${DIRII}/fon_config_msn.html
sed -i -e "/uiViewIsdn/d" "$1"/${DIRII}/fon_config_msn.html
fi
fi
DIRI="usr/www/${HTML}/de/home"
if ! [ -f "$1"/$DIRI/msn.html ]; then
DIRI="usr/www/${HTML}/de/fon"
fi
if [ -f "$1"/$DIRI/msn.html ]; then
#remove auswal Analog / ISDN
#all in one 11945 varinate
if `cat $1/${DIRI}/msn.html | grep -q 'uiIsdn' ` ; then
echo2 " -- remove ISDN option from Festnetzmenue"
sed -i -e "/uiIsdn/,/usePSTN/d" "$1"/${DIRI}/msn.html
sed -i -e "/die Art Ihres Festnetzanschlusses aus/d" "$1"/${DIRI}/msn.html
sed -i -e "/uiViewIsdn/d" "$1"/${DIRI}/msn.html
fi
#older versions
if `cat $1/${DIRI}/msn.html | grep -q 'Text15' ` ; then
echo2 " -- Remove ISDN option from Festnetzmenue"
sed -i -e "/Text15/d" "$1"/${DIRI}/msn.html
sed -i -e "/uiViewIsdn/d" "$1"/${DIRI}/msn.html
fi
fi
#on load display Analog
if [ -f "$1"/$DIRI/msn.js ]; then
if `cat $1/${DIRI}/msn.html | grep -q 'uiOnArt(n)' ` ; then
sed -i -e "s/uiOnArt(n);/uiOnArt(1);/" "$1"/${DIRI}/msn.js
echo2 " ${DIRI}/msn.js"
fi
fi
# added for W501 W701 remove ISDN from callthough page, still usable on all in one
DIRI="usr/www/${HTML}/de/fon/durchwahl."
if [ -f "$1"/${DIRI}htm ]; then
if `cat $1/${DIRI}html | grep -q 'uiViewArtIsdn' ` ; then
sed -i -e 's|
|' "$1/${DIRI}html"
sed -i -e 's|