Indentation

This commit is contained in:
Bob Mottram 2016-03-22 14:43:27 +00:00
parent 1cfce7c67e
commit 9f0ff21b2a
1 changed files with 26 additions and 26 deletions

View File

@ -96,11 +96,11 @@ function add_sip_user {
IFS=''
while read line; do
if [[ "$line" == *'</provision>' ]]; then
echo "<user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE
echo "<extension>$EXTENSION</extension>" >> $NEW_CONFIG_FILE
echo "<secret>$PASSWORD</secret>" >> $NEW_CONFIG_FILE
echo "<display>$MY_USERNAME $EXTENSION</display>" >> $NEW_CONFIG_FILE
echo '</user>' >> $NEW_CONFIG_FILE
echo " <user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE
echo " <extension>$EXTENSION</extension>" >> $NEW_CONFIG_FILE
echo " <secret>$PASSWORD</secret>" >> $NEW_CONFIG_FILE
echo " <display>$MY_USERNAME $EXTENSION</display>" >> $NEW_CONFIG_FILE
echo ' </user>' >> $NEW_CONFIG_FILE
fi
echo $line >> $NEW_CONFIG_FILE
done < $CONFIG_FILE
@ -110,29 +110,29 @@ function add_sip_user {
while [[ $# > 1 ]]
do
key="$1"
key="$1"
case $key in
-h|--help)
show_help
;;
-u|--user)
case $key in
-h|--help)
show_help
;;
-u|--user)
shift
MY_USERNAME="$1"
;;
-e|--extension)
shift
EXTENSION="$1"
;;
-p|--password)
shift
PASSWORD="$1"
;;
*)
# unknown option
;;
esac
shift
MY_USERNAME="$1"
;;
-e|--extension)
shift
EXTENSION="$1"
;;
-p|--password)
shift
PASSWORD="$1"
;;
*)
# unknown option
;;
esac
shift
done
if ! [[ $MY_USERNAME && $EXTENSION && $PASSWORD ]]; then