adjusted installation scripts

pull/746/head
DJ2LS 2024-07-23 12:50:50 +02:00
parent 834cebb67b
commit 5131ef2004
2 changed files with 6 additions and 34 deletions

View File

@ -19,6 +19,9 @@
#
#
# Changelog:
# 1.8 23 July 2024 ( DJ2LS )
# Add support for browser based gui
#
# 1.7 31 May 2024 ( DJ2LS )
# Add support for version specific setup
#
@ -337,6 +340,7 @@ cd freedata_gui
npm i
npm audit fix --force
npm i
npm run build
# Return to the directory we started in
cd ../..

View File

@ -15,6 +15,8 @@
# We expect the config.ini file to be at $HOME/.config/FreeDATA/config.ini
# If it isn't found, we copy config.ini.example there
#
# 1.8: 22 May 2024 (DJ2LS)
# add support for browser based gui
# 1.7: 22 May 2024
# Slightly change the way we shutdown the server
# 1.6: 05 May 2024
@ -91,40 +93,6 @@ FREEDATA_CONFIG=$HOME/.config/FreeDATA/config.ini python3 $serverdir/server.py >
serverpid=$!
echo "Process ID of FreeDATA server is" $serverpid
# Run the GUI front end
echo "*************************************************************************"
echo "Running the FreeDATA GUI front end"
echo "*************************************************************************"
# New versions use "freedata_gui", old versions use "gui"
if [ -d "FreeDATA/freedata_gui" ];
then
guidir="FreeDATA/freedata_gui"
else
guidir="FreeDATA/gui"
fi
cd $guidir
if [ -f "$HOME/.nvm/bash_completion" ];
then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
else
echo "Something went wrong. $HOME/.nvm environment not created properly."
exit 1
fi
checknpm=`which npm`
if [ -z "$checknpm" ];
then
echo "Something went wrong. npm not found."
exit 1
fi
npm start > ../../FreeDATA-client.log 2>&1
# If we are this far, then we have just quit the GUI, so let's clean up the
# server
echo "*************************************************************************"