diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index e4fcb5a1..8d3b4ba6 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -35,7 +35,7 @@ export TEXTDOMAINDIR="/usr/share/locale" COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt SELECTED_USERNAME= -SIP_CONFIG_FILE=/etc/sipwitch.conf +SIP_CONFIGURATION_FILE=/etc/sipwitch.conf ADMIN_USER= UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade" UPDATE_DATE_SCRIPT=/usr/bin/updatedate @@ -51,10 +51,10 @@ PROJECT_REPO="https://github.com/bashrc/${PROJECT_NAME}" USB_DRIVE=sdb # get default USB from config file -CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg -if [ -f $CONFIG_FILE ]; then - if grep -q "USB_DRIVE=" $CONFIG_FILE; then - USB_DRIVE=$(cat $CONFIG_FILE | grep "USB_DRIVE=" | awk -F '=' '{print $2}') +CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg +if [ -f $CONFIGURATION_FILE ]; then + if grep -q "USB_DRIVE=" $CONFIGURATION_FILE; then + USB_DRIVE=$(cat $CONFIGURATION_FILE | grep "USB_DRIVE=" | awk -F '=' '{print $2}') if [[ $USB_DRIVE == *"dev"* ]]; then USB_DRIVE=$(echo ${USB_DRIVE} | awk -F '/' '{print $3}' | sed 's|1||g' | sed 's|2||g') fi @@ -147,7 +147,7 @@ function pad_string { } function show_domains { - DEFAULT_DOMAIN_NAME=$(cat $CONFIG_FILE | grep "DEFAULT_DOMAIN_NAME=" | awk -F '=' '{print $2}') + DEFAULT_DOMAIN_NAME=$(cat $CONFIGURATION_FILE | grep "DEFAULT_DOMAIN_NAME=" | awk -F '=' '{print $2}') echo 'Domains' echo '=======' @@ -274,7 +274,7 @@ function show_users { SIPEXT=$(echo "$ext" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}') fi fi - done < $SIP_CONFIG_FILE + done < $SIP_CONFIGURATION_FILE if [ $SIPEXT ]; then echo -n -e "$(pad_string SIP:${SIPEXT})" else