setup hotspot during install
This commit is contained in:
parent
fdbefe3eea
commit
6a4c2208f5
|
@ -106,6 +106,7 @@ WIFI_INTERFACE=wlan0
|
|||
WIFI_TYPE='wpa2-psk'
|
||||
WIFI_SSID=
|
||||
WIFI_PASSPHRASE=
|
||||
WIFI_HOTSPOT=
|
||||
BATMAN_CELLID='any'
|
||||
WIFI_CHANNEL=
|
||||
CONFIGURATION_FILE=
|
||||
|
@ -303,6 +304,9 @@ function save_configuration_file {
|
|||
if [ ${#WIFI_PASSPHRASE} -gt 1 ]; then
|
||||
echo "WIFI_PASSPHRASE=$WIFI_PASSPHRASE" >> $CONFIGURATION_FILE
|
||||
fi
|
||||
if [ $WIFI_HOTSPOT ]; then
|
||||
echo "WIFI_HOTSPOT=$WIFI_HOTSPOT" >> $CONFIGURATION_FILE
|
||||
fi
|
||||
if [ $BATMAN_CELLID ]; then
|
||||
echo "BATMAN_CELLID=$BATMAN_CELLID" >> $CONFIGURATION_FILE
|
||||
fi
|
||||
|
@ -1326,11 +1330,12 @@ function interactive_configuration {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone Configuration" \
|
||||
--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 \
|
||||
$"SSID:" 2 1 "$WIFI_SSID" 2 16 30 30 \
|
||||
$"Type:" 3 1 "$WIFI_TYPE" 3 16 16 15 \
|
||||
$"Passphrase:" 4 1 "$WIFI_PASSPHRASE" 4 16 30 30 \
|
||||
$"Hotspot:" 5 1 "$WIFI_HOTSPOT" 5 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
|
@ -1341,6 +1346,12 @@ function interactive_configuration {
|
|||
WIFI_SSID=$(cat $data | sed -n 2p)
|
||||
WIFI_TYPE=$(cat $data | sed -n 3p)
|
||||
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
|
||||
fi
|
||||
|
||||
|
@ -1927,183 +1938,183 @@ function interactive_configuration {
|
|||
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
|
||||
else
|
||||
while [ ${#MY_EMAIL_ADDRESS} -lt 5 ]
|
||||
do
|
||||
EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}')
|
||||
if [ ! $EMAIL_ADDRESS ]; then
|
||||
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
|
||||
fi
|
||||
if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then
|
||||
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
|
||||
fi
|
||||
do
|
||||
EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}')
|
||||
if [ ! $EMAIL_ADDRESS ]; then
|
||||
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
|
||||
fi
|
||||
if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then
|
||||
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
|
||||
fi
|
||||
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone Configuration" \
|
||||
--inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
||||
1) exit 1;;
|
||||
255) exit 1;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
save_configuration_file
|
||||
fi
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone Configuration" \
|
||||
--inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
||||
1) exit 1;;
|
||||
255) exit 1;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
save_configuration_file
|
||||
fi
|
||||
|
||||
# delete the temporary configuration file
|
||||
if [ -f temp.cfg ]; then
|
||||
shred -zu temp.cfg
|
||||
fi
|
||||
}
|
||||
# delete the temporary configuration file
|
||||
if [ -f temp.cfg ]; then
|
||||
shred -zu temp.cfg
|
||||
fi
|
||||
}
|
||||
|
||||
function show_result {
|
||||
#clear
|
||||
echo ''
|
||||
echo -n $"Configuration filename:"
|
||||
echo " $CONFIGURATION_FILE"
|
||||
echo ''
|
||||
echo $'Contents:'
|
||||
echo ''
|
||||
cat $CONFIGURATION_FILE
|
||||
echo ''
|
||||
}
|
||||
function show_result {
|
||||
#clear
|
||||
echo ''
|
||||
echo -n $"Configuration filename:"
|
||||
echo " $CONFIGURATION_FILE"
|
||||
echo ''
|
||||
echo $'Contents:'
|
||||
echo ''
|
||||
cat $CONFIGURATION_FILE
|
||||
echo ''
|
||||
}
|
||||
|
||||
function read_configuration {
|
||||
if [ ! $CONFIGURATION_FILE ]; then
|
||||
CONFIGURATION_FILE='freedombone.cfg'
|
||||
fi
|
||||
function read_configuration {
|
||||
if [ ! $CONFIGURATION_FILE ]; then
|
||||
CONFIGURATION_FILE='freedombone.cfg'
|
||||
fi
|
||||
|
||||
if [ -f $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}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "GIT_CODE" $CONFIGURATION_FILE; then
|
||||
GIT_CODE=$(grep "GIT_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
|
||||
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
# for backwards compatability
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_CODE=$(grep "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then
|
||||
NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "NAMESERVER2" $CONFIGURATION_FILE; then
|
||||
NAMESERVER2=$(grep "NAMESERVER2" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEBIAN_REPO" $CONFIGURATION_FILE; then
|
||||
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."
|
||||
fi
|
||||
if grep -q "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DDNS_USERNAME" $CONFIGURATION_FILE; then
|
||||
DDNS_USERNAME=$(grep "DDNS_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DDNS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
DDNS_PASSWORD=$(grep "DDNS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "ENABLE_CJDNS" $CONFIGURATION_FILE; then
|
||||
ENABLE_CJDNS=$(grep "ENABLE_CJDNS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ENABLE_BATMAN" $CONFIGURATION_FILE; then
|
||||
ENABLE_BATMAN=$(grep "ENABLE_BATMAN" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ENABLE_BABEL" $CONFIGURATION_FILE; then
|
||||
ENABLE_BABEL=$(grep "ENABLE_BABEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
|
||||
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_TITLE" $CONFIGURATION_FILE; then
|
||||
WIKI_TITLE=$(grep "WIKI_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_NAME" $CONFIGURATION_FILE; then
|
||||
MY_NAME=$(grep "MY_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE; then
|
||||
MY_EMAIL_ADDRESS=$(grep "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then
|
||||
INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then
|
||||
USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then
|
||||
PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_CODE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_CODE=$(grep "MICROBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "HUBZILLA_CODE" $CONFIGURATION_FILE; then
|
||||
HUBZILLA_CODE=$(grep "HUBZILLA_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_CODE" $CONFIGURATION_FILE; then
|
||||
WIKI_CODE=$(grep "WIKI_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FULLBLOG_CODE" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_CODE=$(grep "FULLBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_BLOG_TITLE" $CONFIGURATION_FILE; then
|
||||
MY_BLOG_TITLE=$(grep "MY_BLOG_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE; then
|
||||
MY_BLOG_SUBTITLE=$(grep "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
|
||||
if [ -f $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}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "GIT_CODE" $CONFIGURATION_FILE; then
|
||||
GIT_CODE=$(grep "GIT_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
|
||||
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
# for backwards compatability
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_CODE=$(grep "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then
|
||||
NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "NAMESERVER2" $CONFIGURATION_FILE; then
|
||||
NAMESERVER2=$(grep "NAMESERVER2" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DEBIAN_REPO" $CONFIGURATION_FILE; then
|
||||
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."
|
||||
fi
|
||||
if grep -q "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DDNS_USERNAME" $CONFIGURATION_FILE; then
|
||||
DDNS_USERNAME=$(grep "DDNS_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "DDNS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
DDNS_PASSWORD=$(grep "DDNS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "ENABLE_CJDNS" $CONFIGURATION_FILE; then
|
||||
ENABLE_CJDNS=$(grep "ENABLE_CJDNS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ENABLE_BATMAN" $CONFIGURATION_FILE; then
|
||||
ENABLE_BATMAN=$(grep "ENABLE_BATMAN" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ENABLE_BABEL" $CONFIGURATION_FILE; then
|
||||
ENABLE_BABEL=$(grep "ENABLE_BABEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
|
||||
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_TITLE" $CONFIGURATION_FILE; then
|
||||
WIKI_TITLE=$(grep "WIKI_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_NAME" $CONFIGURATION_FILE; then
|
||||
MY_NAME=$(grep "MY_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE; then
|
||||
MY_EMAIL_ADDRESS=$(grep "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then
|
||||
INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then
|
||||
USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then
|
||||
PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_CODE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_CODE=$(grep "MICROBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
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}')
|
||||
fi
|
||||
if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "HUBZILLA_CODE" $CONFIGURATION_FILE; then
|
||||
HUBZILLA_CODE=$(grep "HUBZILLA_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIKI_CODE" $CONFIGURATION_FILE; then
|
||||
WIKI_CODE=$(grep "WIKI_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FULLBLOG_CODE" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_CODE=$(grep "FULLBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_BLOG_TITLE" $CONFIGURATION_FILE; then
|
||||
MY_BLOG_TITLE=$(grep "MY_BLOG_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE; then
|
||||
MY_BLOG_SUBTITLE=$(grep "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
|
||||
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "WIFI_SSID" $CONFIGURATION_FILE; then
|
||||
|
|
|
@ -1717,8 +1717,7 @@ function wifi_settings {
|
|||
fi
|
||||
|
||||
HOTSPOT='no'
|
||||
if [[ $NEW_WIFI_HOTSPOT == $'Y' || $NEW_WIFI_HOTSPOT == $'yes' || $NEW_WIFI_HOTSPOT == $'y' ]]; then
|
||||
apt-get -y install hostapd bridge-utils
|
||||
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
|
||||
HOTSPOT='yes'
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue