Updates to setup from testing
All checks were successful
DRB Build Tests / drb_build_and_test (push) Successful in 52s

This commit is contained in:
Logan Cusano
2024-04-26 23:46:13 -04:00
parent 565fd5af37
commit 34aa5d17dc

View File

@@ -16,6 +16,12 @@ if [[ ! -f "$(pwd)/package.json" ]]; then
exit 1
fi
# Check to make sure the pi user exists
if ! id "pi" &>/dev/null; then
echo "Error: User pi does not exist."
exit 1
fi
####------------------- Functions
# Function to prompt user for input with a specific message and store the result in a variable
prompt_user() {
@@ -147,7 +153,8 @@ echo "Installing npm dependencies..."
npm install
# Get rid of PEP 668
rm -rf /usr/lib/python3.11/EMTERNALL-MANAGED
rm -rf /usr/lib/python3.11/EMTERNALL-MANAGED # Not sure if this was an attrocious fat finger or if this is needed, doesn't throw an error, so...
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
# Getting the Python DAB
echo "Installing PDAB and Dependencies"
@@ -181,7 +188,7 @@ echo "OP25_FULL_PATH=$op25_full_path" >> .env
echo "" >> .env
echo "# Core config, DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING" >> .env
echo "CONFIG_PATH=./config/radioPresets.json" >> .env
python3 ./discordAudioBot/pdab/getDevices.py
runuser -l pi -c 'python3 ./discordAudioBot/pdab/getDevices.py'
audio_device_id=$(prompt_user "Enter the ID of the 'input' audio device you would like to use (most often 'default')")
echo "AUDIO_DEVICE_ID=$audio_device_id" >> .env
echo "PDAB_PORT=3110" >> .env
@@ -297,7 +304,7 @@ confirm="${confirm,,}"
#echo "To configure the app, please go to http://$nodeIP:$nodePort" # TODO - uncomment when webapp is built
echo "Thank you for joining the network!"
if [[ "$confirm" != "y" && "$confirm" != "yes" ]]; then
if [[ "$confirm" == "y" && "$confirm" == "yes" ]]; then
# Prompt user to press any key before rebooting
read -rsp $'System will now reboot, press any key to continue or Ctrl+C to cancel...\n' -n1 key
echo "Rebooting..."