Compare commits
2 Commits
69fdc63983
...
06cb2cc352
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06cb2cc352 | ||
|
|
5ce525f2b5 |
@@ -1,7 +1,7 @@
|
|||||||
// Debug
|
// Debug
|
||||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||||
const log = new DebugBuilder("client", "clientController");
|
const log = new DebugBuilder("client", "botController");
|
||||||
const botLog = new DebugBuilder("client", "clientController:bot");
|
const botLog = new DebugBuilder("client", "botController:bot");
|
||||||
|
|
||||||
const spawn = require('child_process').spawn;
|
const spawn = require('child_process').spawn;
|
||||||
const { resolve } = require("path");
|
const { resolve } = require("path");
|
||||||
@@ -34,7 +34,7 @@ exports.joinServer = async (req, res) => {
|
|||||||
log.INFO("Join requested to: ", deviceId, channelId, clientId, presetName, NGThreshold);
|
log.INFO("Join requested to: ", deviceId, channelId, clientId, presetName, NGThreshold);
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
log.DEBUG("Starting Windows Python");
|
log.DEBUG("Starting Windows Python");
|
||||||
pythonProcess = await spawn('H:\\Logan\\Projects\\Python-Discord-Audio-Bot\\venv\\Scripts\\python.exe', [resolve(__dirname, "../pdab/main.py"), deviceId, channelId, clientId, '-n', NGThreshold], { cwd: resolve(__dirname, "../pdab/").toString() });
|
pythonProcess = await spawn('python.exe', [resolve(__dirname, "../pdab/main.py"), deviceId, channelId, clientId, '-n', NGThreshold], { cwd: resolve(__dirname, "../pdab/").toString() });
|
||||||
//pythonProcess = await spawn('C:\\Python310\\python.exe', [resolve(__dirname, "../PDAB/main.py"), deviceId, channelId, clientId, NGThreshold ]);
|
//pythonProcess = await spawn('C:\\Python310\\python.exe', [resolve(__dirname, "../PDAB/main.py"), deviceId, channelId, clientId, NGThreshold ]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ apt-get update
|
|||||||
apt-get upgrade -y
|
apt-get upgrade -y
|
||||||
|
|
||||||
# Install the necessary packages
|
# Install the necessary packages
|
||||||
apt-get install -y nodejs npm libopus-dev gcc make alsa-utils libasound2 libasound2-dev libpulse-dev pulseaudio apulse python3.9
|
apt-get install -y nodejs npm libopus-dev gcc make portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse python3 pip
|
||||||
|
|
||||||
# Ensure pulse audio is running
|
# Ensure pulse audio is running
|
||||||
pulseaudio
|
pulseaudio
|
||||||
@@ -44,12 +44,12 @@ Description=Radio Node Service
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=
|
WorkingDirectory="$SCRIPT_DIR"
|
||||||
ExecStart=/usr/bin/node .
|
ExecStart=/usr/bin/node .
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartDelay=10
|
RestartDelay=10
|
||||||
User=RadioNode
|
User=RadioNode
|
||||||
Environment=DEBUG='server:*'
|
Environment=DEBUG='client:*'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >> /etc/systemd/system/RadioNode.service
|
WantedBy=multi-user.target" >> /etc/systemd/system/RadioNode.service
|
||||||
@@ -60,11 +60,10 @@ Description=Radio Node Updater Service
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=
|
WorkingDirectory="$SCRIPT_DIR"
|
||||||
ExecStart=/usr/bin/node .
|
ExecStart=/usr/bin/bash update.sh
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
User=RadioNode
|
User=RadioNode
|
||||||
Environment=DEBUG='server:*'
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >> /etc/systemd/system/RadioNodeUpdater.service
|
WantedBy=multi-user.target" >> /etc/systemd/system/RadioNodeUpdater.service
|
||||||
|
|||||||
Reference in New Issue
Block a user