Exported needed variables for MySQL logging setup.

pull/222/head
Joe Prochazka 2016-09-09 15:54:41 -04:00
rodzic 7c0e9ee94f
commit 34a70aedba
2 zmienionych plików z 18 dodań i 4 usunięć

Wyświetl plik

@ -104,9 +104,6 @@ else
# Ask which type of database to use.
DATABASEENGINE=$(whiptail --title "Choose Database Type" --nocancel --menu "\nChoose which type of database to use." 11 80 2 "MySQL" "" "SQLite" "" 3>&1 1>&2 2>&3)
# Export this variable.
export ADSB_DATABASEENGINE=$DATABASEENGINE
if [ $DATABASEENGINE = "MySQL" ]; then
# Ask if the database server will be installed locally.
whiptail --title "MySQL Database Location" --yesno "Will the database be hosted locally on this device?" 7 80
@ -457,6 +454,14 @@ fi
## SETUP FLIGHT LOGGING USING THE SCRIPT LOGGING.SH
if [ $ADVANCED = TRUE ]; then
# Export variables needed by logging.sh.
export ADSB_DATABASEENGINE=$DATABASEENGINE
export ADSB_DATABASEHOST=$DATABASEHOST
export ADSB_DATABASEUSER=$DATABASEUSER
export ADSB_DATABASEPASSWORD1=$DATABASEPASSWORD1
export ADSB_DATABASENAME=$DATABASENAME
chmod +x $BASHDIRECTORY/portal/logging.sh
$BASHDIRECTORY/portal/logging.sh
if [ $? -ne 0 ]; then

Wyświetl plik

@ -41,8 +41,17 @@ PORTALBUILDDIRECTORY="$BUILDDIRECTORY/portal"
RAWDOCUMENTROOT=`/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -p | grep server.document-root`
LIGHTTPDDOCUMENTROOT=`sed 's/.*"\(.*\)"[^"]*$/\1/' <<< $RAWDOCUMENTROOT`
# This will not work for first time installs...
DATABASEENGINE=$ADSB_DATABASEENGINE
DATABASEHOST=$ADSB_DATABASEHOST
DATABASEUSER=$ADSB_DATABASEUSER
DATABASEPASSWORD1=$ADSB_DATABASEPASSWORD1
DATABASENAME=$ADSB_DATABASENAME
unset ADSB_DATABASEENGINE
unset ADSB_DATABASEHOST
unset ADSB_DATABASEUSER
unset ADSB_DATABASEPASSWORD1
unset ADSB_DATABASENAME
PYTHONPATH=`which python`