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
|
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
|
exit 0
|
||||||
fi
|
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)
|
WHO=$(whoami)
|
||||||
if [ "$WHO" != "root" ]
|
if [ "$WHO" != "root" ]
|
||||||
then
|
then
|
||||||
|
|
@ -53,41 +21,60 @@ then
|
||||||
echo "This script is only tested in Debian 9 and x64 cpu Arch. "
|
echo "This script is only tested in Debian 9 and x64 cpu Arch. "
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
#############################
|
||||||
DEP="git build-essential php7.0-mbstrin"
|
#stop
|
||||||
DEP2="git build-essential php7.3-mbstrin"
|
if [ -f "/etc/init.d/xlxd" ]
|
||||||
DEP3="git build-essential php-mbstring"
|
|
||||||
VERSION=$(sed 's/\..*//' /etc/debian_version)
|
|
||||||
|
|
||||||
if [ $VERSION = 9 ]
|
|
||||||
then
|
then
|
||||||
apt-get -y install $DEP
|
service xlxd stop
|
||||||
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
|
|
||||||
fi
|
|
||||||
sudo update-rc.d -f xlxd remove
|
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 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
|
if [ ! -d "/opt/xlx-bk" ]; then
|
||||||
mkdir /opt/xlx-bk
|
mkdir /opt/xlx-bk
|
||||||
fi
|
fi
|
||||||
|
|
@ -123,74 +110,80 @@ else
|
||||||
# La carpeta no existe
|
# La carpeta no existe
|
||||||
echo "La carpeta $source_folder no existe. No se realizará la copia."
|
echo "La carpeta $source_folder no existe. No se realizará la copia."
|
||||||
fi
|
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" ]
|
if [ -d "/xlxd" ]
|
||||||
then
|
then
|
||||||
rm -r /xlxd/
|
rm -r /xlxd/
|
||||||
#echo "found file"
|
#echo "found file"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ -d "/opt/xlxd" ]
|
if [ -f "/opt/wdp10" ]
|
||||||
then
|
then
|
||||||
rm -r /opt/xlxd/
|
echo "found file"
|
||||||
#echo "found file"
|
else
|
||||||
|
cat > /opt/wdp10 <<- "EOFX"
|
||||||
|
#########################################
|
||||||
|
# Select number port, XLXD Dashboard #
|
||||||
|
#########################################
|
||||||
|
|
||||||
fi
|
Web-Dashboar-name: XLX
|
||||||
if [ -d "/var/www/xlxd" ]
|
Web-Dashboar-Port: 80
|
||||||
then
|
Web-Dashboar-dns:
|
||||||
rm -r /var/www/xlxd/
|
Web-Dashboar-dir: /opt/xlxd/dashboard
|
||||||
#echo "found file"
|
XLX-XRFNUM:
|
||||||
|
XLX-CONTRIE:
|
||||||
|
XLX-DESCRIPTION:
|
||||||
|
XLX-NMODU:
|
||||||
|
XLX-YSFMODU:
|
||||||
|
XLX-YSFPOR:
|
||||||
|
XLX-AMBIP:
|
||||||
|
XLX-AMBPOR:
|
||||||
|
XLX-EMAIL:
|
||||||
|
XLX-CALLSIGN:
|
||||||
|
|
||||||
|
EOFX
|
||||||
fi
|
fi
|
||||||
for file in "/usr/local/bin/"xlxd*; do
|
############################################
|
||||||
# Verificar si el archivo existe y es un archivo regular
|
apt-get update
|
||||||
if [ -f "$file" ]; then
|
#
|
||||||
rm "$file"
|
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
|
fi
|
||||||
done
|
###################################################
|
||||||
for file in "/usr/local/etc/"xlxd*; do
|
##stop dashboard &xlx
|
||||||
# Verificar si el archivo existe y es un archivo regular
|
wdp=/opt/wdp10
|
||||||
if [ -f "$file" ]; then
|
wsn0=$(grep "Web-Dashboar-name:" $wdp | grep -oP 'Web-Dashboar-name:\s*\K.*')
|
||||||
rm "$file"
|
if [ -f "/etc/nginx/sites-enabled/$wsn0" ]; then
|
||||||
|
rm /etc/nginx/sites-enabled/$wsn0
|
||||||
fi
|
fi
|
||||||
done
|
if [ -f "/etc/nginx/sites-enabled/000" ]; then
|
||||||
#######################
|
rm /etc/nginx/sites-enabled/000
|
||||||
|
fi
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
##########################################################################
|
||||||
#INSTALL
|
#INSTALL
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
cd /opt
|
cd /opt
|
||||||
git clone https://github.com/LX3JL/xlxd.git
|
git clone https://github.com/LX3JL/xlxd.git
|
||||||
#git clone https://github.com/iu5jae/xlxd.git
|
#git clone https://github.com/iu5jae/xlxd.git
|
||||||
#git clone https://github.com/n7tae/new-xlxd.git xlxd
|
#git clone https://github.com/n7tae/new-xlxd.git xlxd
|
||||||
#cd /opt/xlxd/
|
#cd xlxd/
|
||||||
#mv dashboard.xlx dashboard
|
#sudo git checkout IMRS &&
|
||||||
#mv dashboard.xrf dashboard2
|
cd /opt/xlxd/src
|
||||||
cd /opt/xlxd/src/
|
#
|
||||||
|
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
#######################
|
#######################
|
||||||
#dash1
|
#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
|
sed -i "s|define YSF_AUTOLINK_ENABLE.*|define YSF_AUTOLINK_ENABLE 1|g" /opt/xlxd/src/main.h
|
||||||
#xlxd-start
|
#xlxd-start
|
||||||
###########
|
###########
|
||||||
|
#cd /opt/xlxd/
|
||||||
|
#git checkout IMRS
|
||||||
cd /opt/xlxd/src/
|
cd /opt/xlxd/src/
|
||||||
make clean
|
make clean
|
||||||
make
|
make
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue