Compare commits

...

2 Commits

Author SHA1 Message Date
Logan Cusano
3cb53605c7 Working on #13
- Running the 'pactl' command
- Using regex on the output to find the active running device
2024-03-08 21:58:27 -05:00
Logan Cusano
b7d4cbf46c Adding to the setup script #10
- Change permissions on the whole project dir
- Add an echo for better visibility
2024-03-08 21:55:24 -05:00
2 changed files with 17 additions and 4 deletions

View File

@@ -9,8 +9,12 @@ let type = "dshow";
// Set Linux values for use in production // Set Linux values for use in production
if (os.platform() === 'linux') { if (os.platform() === 'linux') {
await executeCommand("pactl", ['list', 'short', 'sources']).then(cliOutput => { await new Promise((res) => {
executeCommand("pactl", ['list', 'short', 'sources']).then(cliOutput => {
device = extractValue(cliOutput, '(?:\d[ ]{4,12}(.+?)[ ]{4,12}(?:.+?[ ]{4,12}){2,4}RUNNING)') device = extractValue(cliOutput, '(?:\d[ ]{4,12}(.+?)[ ]{4,12}(?:.+?[ ]{4,12}){2,4}RUNNING)')
console.log("Device:", device);
res();
});
}); });
type = "pulse"; // Replace with appropriate type for Linux type = "pulse"; // Replace with appropriate type for Linux
} }

View File

@@ -72,6 +72,7 @@ echo "Installing npm dependencies..."
npm install npm install
# Generate .env file # Generate .env file
echo "Creating the config .env file..."
echo "# Client Config" > .env echo "# Client Config" > .env
echo "CLIENT_NUID=0" >> .env echo "CLIENT_NUID=0" >> .env
client_name=$(prompt_user "Enter the name for this node") client_name=$(prompt_user "Enter the name for this node")
@@ -151,6 +152,7 @@ echo "Cloning OP25 from the git repository..."
git clone https://github.com/boatbod/op25.git git clone https://github.com/boatbod/op25.git
# Navigate to the OP25 directory # Navigate to the OP25 directory
$ogPwd = $(pwd)
cd op25 cd op25
# Edit the startup script to use the active.cfg.json config file generated by the app # Edit the startup script to use the active.cfg.json config file generated by the app
@@ -190,3 +192,10 @@ echo "Installing OP25..."
./install.sh ./install.sh
echo "\n\n\t\tOP25 installation completed!\n\n" echo "\n\n\t\tOP25 installation completed!\n\n"
# Setting permissions on the directories created
cd $ogPwd
chown -R 1000:1000 ./*
echo "Permissions set on the client directory!"
echo "\n\n\t\tNode installation Complete!"