setup hotspot during install

This commit is contained in:
Bob Mottram 2016-04-21 14:14:38 +01:00
parent fdbefe3eea
commit 6a4c2208f5
2 changed files with 186 additions and 176 deletions

View File

@ -106,6 +106,7 @@ WIFI_INTERFACE=wlan0
WIFI_TYPE='wpa2-psk' WIFI_TYPE='wpa2-psk'
WIFI_SSID= WIFI_SSID=
WIFI_PASSPHRASE= WIFI_PASSPHRASE=
WIFI_HOTSPOT=
BATMAN_CELLID='any' BATMAN_CELLID='any'
WIFI_CHANNEL= WIFI_CHANNEL=
CONFIGURATION_FILE= CONFIGURATION_FILE=
@ -303,6 +304,9 @@ function save_configuration_file {
if [ ${#WIFI_PASSPHRASE} -gt 1 ]; then if [ ${#WIFI_PASSPHRASE} -gt 1 ]; then
echo "WIFI_PASSPHRASE=$WIFI_PASSPHRASE" >> $CONFIGURATION_FILE echo "WIFI_PASSPHRASE=$WIFI_PASSPHRASE" >> $CONFIGURATION_FILE
fi fi
if [ $WIFI_HOTSPOT ]; then
echo "WIFI_HOTSPOT=$WIFI_HOTSPOT" >> $CONFIGURATION_FILE
fi
if [ $BATMAN_CELLID ]; then if [ $BATMAN_CELLID ]; then
echo "BATMAN_CELLID=$BATMAN_CELLID" >> $CONFIGURATION_FILE echo "BATMAN_CELLID=$BATMAN_CELLID" >> $CONFIGURATION_FILE
fi fi
@ -1326,11 +1330,12 @@ function interactive_configuration {
trap "rm -f $data" 0 1 2 5 15 trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \ dialog --backtitle $"Freedombone Configuration" \
--title $"Wifi setup" \ --title $"Wifi setup" \
--form $"\nIf you wish to use wifi rather than wired ethernet then enter the details below, otherwise just select Ok:" 15 55 5 \ --form $"\nIf you wish to use wifi rather than wired ethernet then enter the details below, otherwise just select Ok:" 16 55 6 \
$"Interface:" 1 1 "$WIFI_INTERFACE" 1 16 16 15 \ $"Interface:" 1 1 "$WIFI_INTERFACE" 1 16 16 15 \
$"SSID:" 2 1 "$WIFI_SSID" 2 16 30 30 \ $"SSID:" 2 1 "$WIFI_SSID" 2 16 30 30 \
$"Type:" 3 1 "$WIFI_TYPE" 3 16 16 15 \ $"Type:" 3 1 "$WIFI_TYPE" 3 16 16 15 \
$"Passphrase:" 4 1 "$WIFI_PASSPHRASE" 4 16 30 30 \ $"Passphrase:" 4 1 "$WIFI_PASSPHRASE" 4 16 30 30 \
$"Hotspot:" 5 1 "$WIFI_HOTSPOT" 5 16 16 15 \
2> $data 2> $data
sel=$? sel=$?
case $sel in case $sel in
@ -1341,6 +1346,12 @@ function interactive_configuration {
WIFI_SSID=$(cat $data | sed -n 2p) WIFI_SSID=$(cat $data | sed -n 2p)
WIFI_TYPE=$(cat $data | sed -n 3p) WIFI_TYPE=$(cat $data | sed -n 3p)
WIFI_PASSPHRASE=$(cat $data | sed -n 4p) WIFI_PASSPHRASE=$(cat $data | sed -n 4p)
WIFI_HOTSPOT=$(cat $data | sed -n 5p)
if [[ $WIFI_HOTSPOT == $'Y' || $WIFI_HOTSPOT == $'y' || $WIFI_HOTSPOT == $'yes' || $WIFI_HOTSPOT == $'Yes' || $WIFI_HOTSPOT == $'true' || $WIFI_HOTSPOT == $'on' || $WIFI_HOTSPOT == $'True' || $WIFI_HOTSPOT == '1' ]]; then
WIFI_HOTSPOT='yes'
else
WIFI_HOTSPOT='no'
fi
save_configuration_file save_configuration_file
fi fi
@ -1927,183 +1938,183 @@ function interactive_configuration {
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
else else
while [ ${#MY_EMAIL_ADDRESS} -lt 5 ] while [ ${#MY_EMAIL_ADDRESS} -lt 5 ]
do do
EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}') EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}')
if [ ! $EMAIL_ADDRESS ]; then if [ ! $EMAIL_ADDRESS ]; then
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
fi fi
if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
fi fi
data=$(tempfile 2>/dev/null) data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15 trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \ dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data --inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
sel=$? sel=$?
case $sel in case $sel in
0) MY_EMAIL_ADDRESS=$(cat $data);; 0) MY_EMAIL_ADDRESS=$(cat $data);;
1) exit 1;; 1) exit 1;;
255) exit 1;; 255) exit 1;;
esac esac
done done
fi fi
save_configuration_file save_configuration_file
fi fi
# delete the temporary configuration file # delete the temporary configuration file
if [ -f temp.cfg ]; then if [ -f temp.cfg ]; then
shred -zu temp.cfg shred -zu temp.cfg
fi fi
} }
function show_result { function show_result {
#clear #clear
echo '' echo ''
echo -n $"Configuration filename:" echo -n $"Configuration filename:"
echo " $CONFIGURATION_FILE" echo " $CONFIGURATION_FILE"
echo '' echo ''
echo $'Contents:' echo $'Contents:'
echo '' echo ''
cat $CONFIGURATION_FILE cat $CONFIGURATION_FILE
echo '' echo ''
} }
function read_configuration { function read_configuration {
if [ ! $CONFIGURATION_FILE ]; then if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE='freedombone.cfg' CONFIGURATION_FILE='freedombone.cfg'
fi fi
if [ -f $CONFIGURATION_FILE ]; then if [ -f $CONFIGURATION_FILE ]; then
if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}') FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}') FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE; then if grep -q "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE; then
ENABLE_SOCIAL_KEY_MANAGEMENT=$(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ENABLE_SOCIAL_KEY_MANAGEMENT=$(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "GIT_CODE" $CONFIGURATION_FILE; then if grep -q "GIT_CODE" $CONFIGURATION_FILE; then
GIT_CODE=$(grep "GIT_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') GIT_CODE=$(grep "GIT_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
# for backwards compatability # for backwards compatability
DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE; then if grep -q "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE; then
DEFAULT_DOMAIN_CODE=$(grep "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DEFAULT_DOMAIN_CODE=$(grep "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then
NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}') NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "NAMESERVER2" $CONFIGURATION_FILE; then if grep -q "NAMESERVER2" $CONFIGURATION_FILE; then
NAMESERVER2=$(grep "NAMESERVER2" $CONFIGURATION_FILE | awk -F '=' '{print $2}') NAMESERVER2=$(grep "NAMESERVER2" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DEBIAN_REPO" $CONFIGURATION_FILE; then if grep -q "DEBIAN_REPO" $CONFIGURATION_FILE; then
DEBIAN_REPO=$(grep "DEBIAN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DEBIAN_REPO=$(grep "DEBIAN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list." CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
fi fi
if grep -q "DDNS_PROVIDER" $CONFIGURATION_FILE; then if grep -q "DDNS_PROVIDER" $CONFIGURATION_FILE; then
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DDNS_USERNAME" $CONFIGURATION_FILE; then if grep -q "DDNS_USERNAME" $CONFIGURATION_FILE; then
DDNS_USERNAME=$(grep "DDNS_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DDNS_USERNAME=$(grep "DDNS_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "DDNS_PASSWORD" $CONFIGURATION_FILE; then if grep -q "DDNS_PASSWORD" $CONFIGURATION_FILE; then
DDNS_PASSWORD=$(grep "DDNS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}') DDNS_PASSWORD=$(grep "DDNS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE; then if grep -q "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE; then
LOCAL_NETWORK_STATIC_IP_ADDRESS=$(grep "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}') LOCAL_NETWORK_STATIC_IP_ADDRESS=$(grep "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "ENABLE_CJDNS" $CONFIGURATION_FILE; then if grep -q "ENABLE_CJDNS" $CONFIGURATION_FILE; then
ENABLE_CJDNS=$(grep "ENABLE_CJDNS" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ENABLE_CJDNS=$(grep "ENABLE_CJDNS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "ENABLE_BATMAN" $CONFIGURATION_FILE; then if grep -q "ENABLE_BATMAN" $CONFIGURATION_FILE; then
ENABLE_BATMAN=$(grep "ENABLE_BATMAN" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ENABLE_BATMAN=$(grep "ENABLE_BATMAN" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "ENABLE_BABEL" $CONFIGURATION_FILE; then if grep -q "ENABLE_BABEL" $CONFIGURATION_FILE; then
ENABLE_BABEL=$(grep "ENABLE_BABEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ENABLE_BABEL=$(grep "ENABLE_BABEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "WIKI_TITLE" $CONFIGURATION_FILE; then if grep -q "WIKI_TITLE" $CONFIGURATION_FILE; then
WIKI_TITLE=$(grep "WIKI_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') WIKI_TITLE=$(grep "WIKI_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MY_NAME" $CONFIGURATION_FILE; then if grep -q "MY_NAME" $CONFIGURATION_FILE; then
MY_NAME=$(grep "MY_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MY_NAME=$(grep "MY_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE; then if grep -q "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE; then
MY_EMAIL_ADDRESS=$(grep "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MY_EMAIL_ADDRESS=$(grep "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then
INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}') INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then
USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then
PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}') PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MICROBLOG_CODE" $CONFIGURATION_FILE; then if grep -q "MICROBLOG_CODE" $CONFIGURATION_FILE; then
MICROBLOG_CODE=$(grep "MICROBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MICROBLOG_CODE=$(grep "MICROBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then
MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MICROBLOG_BACKGROUND_IMAGE_URL" $CONFIGURATION_FILE; then if grep -q "MICROBLOG_BACKGROUND_IMAGE_URL" $CONFIGURATION_FILE; then
MICROBLOG_BACKGROUND_IMAGE_URL=$(grep "MICROBLOG_BACKGROUND_IMAGE_URL" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MICROBLOG_BACKGROUND_IMAGE_URL=$(grep "MICROBLOG_BACKGROUND_IMAGE_URL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then
HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "HUBZILLA_CODE" $CONFIGURATION_FILE; then if grep -q "HUBZILLA_CODE" $CONFIGURATION_FILE; then
HUBZILLA_CODE=$(grep "HUBZILLA_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') HUBZILLA_CODE=$(grep "HUBZILLA_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then
WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "WIKI_CODE" $CONFIGURATION_FILE; then if grep -q "WIKI_CODE" $CONFIGURATION_FILE; then
WIKI_CODE=$(grep "WIKI_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') WIKI_CODE=$(grep "WIKI_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "FULLBLOG_CODE" $CONFIGURATION_FILE; then if grep -q "FULLBLOG_CODE" $CONFIGURATION_FILE; then
FULLBLOG_CODE=$(grep "FULLBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') FULLBLOG_CODE=$(grep "FULLBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MY_BLOG_TITLE" $CONFIGURATION_FILE; then if grep -q "MY_BLOG_TITLE" $CONFIGURATION_FILE; then
MY_BLOG_TITLE=$(grep "MY_BLOG_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MY_BLOG_TITLE=$(grep "MY_BLOG_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE; then if grep -q "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE; then
MY_BLOG_SUBTITLE=$(grep "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MY_BLOG_SUBTITLE=$(grep "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "WIFI_SSID" $CONFIGURATION_FILE; then if grep -q "WIFI_SSID" $CONFIGURATION_FILE; then

View File

@ -1717,10 +1717,9 @@ function wifi_settings {
fi fi
HOTSPOT='no' HOTSPOT='no'
if [[ $NEW_WIFI_HOTSPOT == $'Y' || $NEW_WIFI_HOTSPOT == $'yes' || $NEW_WIFI_HOTSPOT == $'y' ]]; then if [[ $NEW_WIFI_HOTSPOT == $'Y' || $NEW_WIFI_HOTSPOT == $'y' || $NEW_WIFI_HOTSPOT == $'yes' || $NEW_WIFI_HOTSPOT == $'Yes' || $NEW_WIFI_HOTSPOT == $'true' || $NEW_WIFI_HOTSPOT == $'on' || $NEW_WIFI_HOTSPOT == $'True' || $NEW_WIFI_HOTSPOT == '1' ]]; then
apt-get -y install hostapd bridge-utils
HOTSPOT='yes' HOTSPOT='yes'
fi fi
${PROJECT_NAME}-wifi -i $NEW_WIFI_INTERFACE -s $NEW_WIFI_SSID -t $NEW_WIFI_TYPE -p $NEW_WIFI_PASSPHRASE --hotspot $HOTSPOT ${PROJECT_NAME}-wifi -i $NEW_WIFI_INTERFACE -s $NEW_WIFI_SSID -t $NEW_WIFI_TYPE -p $NEW_WIFI_PASSPHRASE --hotspot $HOTSPOT
else else