Spaces
This commit is contained in:
parent
2ae3f297e4
commit
4c0ce24d4c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}')
|
||||
|
|
Loading…
Reference in New Issue