Spaces
This commit is contained in:
parent
2ae3f297e4
commit
4c0ce24d4c
|
@ -43,7 +43,7 @@ function show_help {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sip_user_exists {
|
function sip_user_exists {
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
||||||
USER_EXISTS="yes"
|
USER_EXISTS="yes"
|
||||||
|
@ -59,7 +59,7 @@ function update_sip_user {
|
||||||
rm -f $NEW_CONFIG_FILE
|
rm -f $NEW_CONFIG_FILE
|
||||||
fi
|
fi
|
||||||
touch $NEW_CONFIG_FILE
|
touch $NEW_CONFIG_FILE
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [ ! $USER_FOUND ]; then
|
if [ ! $USER_FOUND ]; then
|
||||||
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
||||||
|
@ -88,7 +88,7 @@ function add_sip_user {
|
||||||
rm -f $NEW_CONFIG_FILE
|
rm -f $NEW_CONFIG_FILE
|
||||||
fi
|
fi
|
||||||
touch $NEW_CONFIG_FILE
|
touch $NEW_CONFIG_FILE
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [[ "$line" == '</provision>' ]]; then
|
if [[ "$line" == '</provision>' ]]; then
|
||||||
echo "<user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE
|
echo "<user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE
|
||||||
|
|
|
@ -41,7 +41,7 @@ function show_help {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sip_user_exists {
|
function sip_user_exists {
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
||||||
USER_EXISTS="yes"
|
USER_EXISTS="yes"
|
||||||
|
@ -57,7 +57,7 @@ function remove_sip_user {
|
||||||
rm -f $NEW_CONFIG_FILE
|
rm -f $NEW_CONFIG_FILE
|
||||||
fi
|
fi
|
||||||
touch $NEW_CONFIG_FILE
|
touch $NEW_CONFIG_FILE
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [ ! $USER_FOUND ]; then
|
if [ ! $USER_FOUND ]; then
|
||||||
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
if [[ "$line" == "<user id=\"$MY_USERNAME\">" ]]; then
|
||||||
|
|
|
@ -34,7 +34,7 @@ CONFIG_FILE=/etc/sipwitch.conf
|
||||||
extensions=()
|
extensions=()
|
||||||
|
|
||||||
# get the used extensions
|
# get the used extensions
|
||||||
for line in $ (cat $CONFIG_FILE)
|
for line in $(cat $CONFIG_FILE)
|
||||||
do
|
do
|
||||||
if [[ "$line" == "<extension>"* ]]; then
|
if [[ "$line" == "<extension>"* ]]; then
|
||||||
ext=$(echo "$line" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}')
|
ext=$(echo "$line" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}')
|
||||||
|
|
Loading…
Reference in New Issue