|
|
|
|
@ -454,8 +454,35 @@ sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
|
|
|
|
|
sed -i "s/1234567/1234567,1231237,123123701/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
|
|
|
|
|
#sed -i '228s/20/50/' /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
|
|
|
|
|
#################
|
|
|
|
|
sudo pip3 uninstall -y twisted --quiet
|
|
|
|
|
sudo pip3 install twisted --quiet
|
|
|
|
|
# Verificar y actualizar python3-venv si no está instalado
|
|
|
|
|
if ! dpkg -s python3-venv >/dev/null 2>&1; then
|
|
|
|
|
echo "python3-venv no está instalado. Instalando..."
|
|
|
|
|
apt-get install python3-venv -y
|
|
|
|
|
echo "python3-venv instalado correctamente."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Crear y activar un entorno virtual
|
|
|
|
|
cd /opt/
|
|
|
|
|
python3 -m venv myenv
|
|
|
|
|
# Detectar el sistema operativo y su versión
|
|
|
|
|
if [ -f "/etc/os-release" ]; then
|
|
|
|
|
. /etc/os-release
|
|
|
|
|
OS=$ID
|
|
|
|
|
VERSION=$VERSION_ID
|
|
|
|
|
else
|
|
|
|
|
echo "No se pudo detectar el sistema operativo."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
# Instalación de módulos pip según el sistema operativo
|
|
|
|
|
if [ "$OS" == "debian" ] && [ "$VERSION" == "12" ]; then
|
|
|
|
|
source myenv/bin/activate
|
|
|
|
|
/usr/bin/python3 -m pip uninstall --break-system-packages twisted -y
|
|
|
|
|
/usr/bin/python3 -m pip install --break-system-packages twisted==22.10.0
|
|
|
|
|
deactivate
|
|
|
|
|
else
|
|
|
|
|
sudo pip3 uninstall -y twisted --quiet
|
|
|
|
|
pip install Twisted==22.10.0
|
|
|
|
|
fi
|
|
|
|
|
sh /opt/extra-1.sh
|
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
sudo systemctl start proxy.service
|
|
|
|
|
|