This commit is contained in:
Bob Mottram 2015-11-02 11:27:32 +00:00
parent 2ae3f297e4
commit 4c0ce24d4c
3 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ function show_help {
}
function sip_user_exists {
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
USER_EXISTS="yes"
@ -59,7 +59,7 @@ function update_sip_user {
rm -f $NEW_CONFIG_FILE
fi
touch $NEW_CONFIG_FILE
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [ ! $USER_FOUND ]; then
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
@ -88,7 +88,7 @@ function add_sip_user {
rm -f $NEW_CONFIG_FILE
fi
touch $NEW_CONFIG_FILE
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [[ "$line" == '</provision>' ]]; then
echo "<user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE

View File

@ -41,7 +41,7 @@ function show_help {
}
function sip_user_exists {
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
USER_EXISTS="yes"
@ -57,7 +57,7 @@ function remove_sip_user {
rm -f $NEW_CONFIG_FILE
fi
touch $NEW_CONFIG_FILE
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [ ! $USER_FOUND ]; then
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then

View File

@ -34,7 +34,7 @@ CONFIG_FILE=/etc/sipwitch.conf
extensions=()
# get the used extensions
for line in $ (cat $CONFIG_FILE)
for line in $(cat $CONFIG_FILE)
do
if [[ "$line" == "<extension>"* ]]; then
ext=$(echo "$line" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}')