mirror of https://gitlab.com/hp3icc/emq-TE1.git
This commit is contained in:
parent
dc4390d2b8
commit
d1bcef16ec
223
install/xlxd.sh
223
install/xlxd.sh
|
|
@ -8,38 +8,6 @@ if [[ $EUID -ne 0 ]]; then
|
|||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
fi
|
||||
if systemctl status xlxd.service |grep active >/dev/null 2>&1
|
||||
then service xlxd stop
|
||||
|
||||
fi
|
||||
if [ -f "/opt/wdp10" ]
|
||||
then
|
||||
echo "found file"
|
||||
else
|
||||
cat > /opt/wdp10 <<- "EOFX"
|
||||
#########################################
|
||||
# Select number port, XLXD Dashboard #
|
||||
#########################################
|
||||
|
||||
Web-Dashboar-name: XLX
|
||||
Web-Dashboar-Port: 80
|
||||
Web-Dashboar-dns:
|
||||
Web-Dashboar-dir: /opt/xlxd/dashboard
|
||||
XLX-XRFNUM:
|
||||
XLX-CONTRIE:
|
||||
XLX-DESCRIPTION:
|
||||
XLX-NMODU:
|
||||
XLX-YSFMODU:
|
||||
XLX-YSFPOR:
|
||||
XLX-AMBIP:
|
||||
XLX-AMBPOR:
|
||||
XLX-EMAIL:
|
||||
XLX-CALLSIGN:
|
||||
|
||||
EOFX
|
||||
fi
|
||||
apt-get update
|
||||
#
|
||||
WHO=$(whoami)
|
||||
if [ "$WHO" != "root" ]
|
||||
then
|
||||
|
|
@ -53,41 +21,60 @@ then
|
|||
echo "This script is only tested in Debian 9 and x64 cpu Arch. "
|
||||
exit 0
|
||||
fi
|
||||
#############################
|
||||
#stop
|
||||
if [ -f "/etc/init.d/xlxd" ]
|
||||
then
|
||||
service xlxd stop
|
||||
sudo update-rc.d -f xlxd remove
|
||||
#echo "found file"
|
||||
|
||||
DEP="git build-essential php7.0-mbstrin"
|
||||
DEP2="git build-essential php7.3-mbstrin"
|
||||
DEP3="git build-essential php-mbstring"
|
||||
VERSION=$(sed 's/\..*//' /etc/debian_version)
|
||||
|
||||
if [ $VERSION = 9 ]
|
||||
fi
|
||||
if [ -f "/etc/init.d/xlxd" ]
|
||||
then
|
||||
apt-get -y install $DEP
|
||||
elif [ $VERSION = 10 ]
|
||||
then
|
||||
apt-get -y install $DEP2
|
||||
elif [ $VERSION = 11 ]
|
||||
then
|
||||
apt-get -y install $DEP3
|
||||
fi
|
||||
###################################################
|
||||
##stop dashboard &xlx
|
||||
wdp=/opt/wdp10
|
||||
wsn0=$(grep "Web-Dashboar-name:" $wdp | grep -oP 'Web-Dashboar-name:\s*\K.*')
|
||||
if [ -f "/etc/nginx/sites-enabled/$wsn0" ]; then
|
||||
rm /etc/nginx/sites-enabled/$wsn0
|
||||
fi
|
||||
if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
||||
rm /etc/nginx/sites-enabled/000
|
||||
fi
|
||||
sudo systemctl restart nginx
|
||||
if [ -f "/etc/init.d/xlxd" ]; then
|
||||
systemctl stop xlxd
|
||||
fi
|
||||
if [ -f "/etc/init.d/xlxd" ]; then
|
||||
rm /etc/init.d/xlxd
|
||||
#echo "found file"
|
||||
fi
|
||||
sudo update-rc.d -f xlxd remove
|
||||
#
|
||||
if systemctl status xlxd.service |grep active >/dev/null 2>&1
|
||||
then service xlxd stop
|
||||
|
||||
fi
|
||||
if [ -d "/root/reflector-install-files" ]
|
||||
then
|
||||
rm -r /root/reflector-install-files/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/root/xlxd" ]
|
||||
then
|
||||
rm -r /root/xlxd/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/opt/xlxd" ]
|
||||
then
|
||||
rm -r /opt/xlxd/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/var/www/xlxd" ]
|
||||
then
|
||||
rm -r /var/www/xlxd/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
for file in "/usr/local/bin/"xlxd*; do
|
||||
# Verificar si el archivo existe y es un archivo regular
|
||||
if [ -f "$file" ]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
for file in "/usr/local/etc/"xlxd*; do
|
||||
# Verificar si el archivo existe y es un archivo regular
|
||||
if [ -f "$file" ]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
if [ ! -d "/opt/xlx-bk" ]; then
|
||||
mkdir /opt/xlx-bk
|
||||
fi
|
||||
|
|
@ -123,74 +110,80 @@ else
|
|||
# La carpeta no existe
|
||||
echo "La carpeta $source_folder no existe. No se realizará la copia."
|
||||
fi
|
||||
###################################################
|
||||
#emqte1-xlx
|
||||
if [ -f "/etc/init.d/xlxd" ]
|
||||
then
|
||||
service xlxd stop
|
||||
sudo update-rc.d -f xlxd remove
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -f "/etc/init.d/xlxd" ]
|
||||
then
|
||||
rm /etc/init.d/xlxd
|
||||
#echo "found file"
|
||||
fi
|
||||
if [ -d "/root/reflector-install-files" ]
|
||||
then
|
||||
rm -r /root/reflector-install-files/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/root/xlxd" ]
|
||||
then
|
||||
rm -r /root/xlxd/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/xlxd" ]
|
||||
then
|
||||
rm -r /xlxd/
|
||||
#echo "found file"
|
||||
|
||||
fi
|
||||
if [ -d "/opt/xlxd" ]
|
||||
if [ -f "/opt/wdp10" ]
|
||||
then
|
||||
rm -r /opt/xlxd/
|
||||
#echo "found file"
|
||||
echo "found file"
|
||||
else
|
||||
cat > /opt/wdp10 <<- "EOFX"
|
||||
#########################################
|
||||
# Select number port, XLXD Dashboard #
|
||||
#########################################
|
||||
|
||||
fi
|
||||
if [ -d "/var/www/xlxd" ]
|
||||
then
|
||||
rm -r /var/www/xlxd/
|
||||
#echo "found file"
|
||||
Web-Dashboar-name: XLX
|
||||
Web-Dashboar-Port: 80
|
||||
Web-Dashboar-dns:
|
||||
Web-Dashboar-dir: /opt/xlxd/dashboard
|
||||
XLX-XRFNUM:
|
||||
XLX-CONTRIE:
|
||||
XLX-DESCRIPTION:
|
||||
XLX-NMODU:
|
||||
XLX-YSFMODU:
|
||||
XLX-YSFPOR:
|
||||
XLX-AMBIP:
|
||||
XLX-AMBPOR:
|
||||
XLX-EMAIL:
|
||||
XLX-CALLSIGN:
|
||||
|
||||
EOFX
|
||||
fi
|
||||
for file in "/usr/local/bin/"xlxd*; do
|
||||
# Verificar si el archivo existe y es un archivo regular
|
||||
if [ -f "$file" ]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
for file in "/usr/local/etc/"xlxd*; do
|
||||
# Verificar si el archivo existe y es un archivo regular
|
||||
if [ -f "$file" ]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
#######################
|
||||
############################################
|
||||
apt-get update
|
||||
#
|
||||
DEP="git build-essential php7.0-mbstrin"
|
||||
DEP2="git build-essential php7.3-mbstrin"
|
||||
DEP3="git build-essential php-mbstring"
|
||||
DEP4="git build-essential php-mbstring sudo sed curl wget"
|
||||
VERSION=$(sed 's/\..*//' /etc/debian_version)
|
||||
|
||||
if [ $VERSION = 9 ]; then
|
||||
apt-get -y install $DEP
|
||||
elif [ $VERSION = 10 ]; then
|
||||
apt-get -y install $DEP2
|
||||
elif [ $VERSION = 11 ]; then
|
||||
apt-get -y install $DEP3
|
||||
elif [ "$VERSION" = 12 ]; then
|
||||
apt-get -y install $DEP3
|
||||
else
|
||||
apt-get -y install $DEP4
|
||||
fi
|
||||
###################################################
|
||||
##stop dashboard &xlx
|
||||
wdp=/opt/wdp10
|
||||
wsn0=$(grep "Web-Dashboar-name:" $wdp | grep -oP 'Web-Dashboar-name:\s*\K.*')
|
||||
if [ -f "/etc/nginx/sites-enabled/$wsn0" ]; then
|
||||
rm /etc/nginx/sites-enabled/$wsn0
|
||||
fi
|
||||
if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
||||
rm /etc/nginx/sites-enabled/000
|
||||
fi
|
||||
sudo systemctl restart nginx
|
||||
##########################################################################
|
||||
#INSTALL
|
||||
echo "------------------------------------------------------------------------------"
|
||||
cd /opt
|
||||
git clone https://github.com/LX3JL/xlxd.git
|
||||
#git clone https://github.com/iu5jae/xlxd.git
|
||||
#git clone https://github.com/n7tae/new-xlxd.git xlxd
|
||||
#cd /opt/xlxd/
|
||||
#mv dashboard.xlx dashboard
|
||||
#mv dashboard.xrf dashboard2
|
||||
cd /opt/xlxd/src/
|
||||
|
||||
#cd xlxd/
|
||||
#sudo git checkout IMRS &&
|
||||
cd /opt/xlxd/src
|
||||
#
|
||||
echo "------------------------------------------------------------------------------"
|
||||
#######################
|
||||
#dash1
|
||||
|
|
|
|||
|
|
@ -359,6 +359,8 @@ sed -i "s|YSF_DEFAULT_NODE_RX_FREQ.*|YSF_DEFAULT_NODE_RX_FREQ 434000000|g
|
|||
sed -i "s|define YSF_AUTOLINK_ENABLE.*|define YSF_AUTOLINK_ENABLE 1|g" /opt/xlxd/src/main.h
|
||||
#xlxd-start
|
||||
###########
|
||||
#cd /opt/xlxd/
|
||||
#git checkout IMRS
|
||||
cd /opt/xlxd/src/
|
||||
make clean
|
||||
make
|
||||
|
|
|
|||
Loading…
Reference in New Issue