Update xlxd-debian-installer.sh

Update script inline with upstream
This commit is contained in:
M0VUB 2024-09-22 20:54:50 +01:00 committed by GitHub
parent a70b6cfe44
commit b480b06398
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,11 +12,11 @@ fi
if [ ! -e "/etc/debian_version" ] if [ ! -e "/etc/debian_version" ]
then then
echo "" echo ""
echo "This script is only tested in Debian 9 and x64 cpu Arch. " echo "This script is only tested on Debian and x64 CPU Arch. but XLX will work on most ANY Linux distro. "
exit 0 exit 0
fi fi
DIRDIR=$(pwd) DIRDIR=$(pwd)
LOCAL_IP=$(ip a | grep inet | grep "eth0\|en" | awk '{print $2}' | tr '/' ' ' | awk '{print $1}') LOCAL_IP=$(hostname -I | awk '{print $1}')
INFREF=https://n5amd.com/digital-radio-how-tos/create-xlx-xrf-d-star-reflector/ INFREF=https://n5amd.com/digital-radio-how-tos/create-xlx-xrf-d-star-reflector/
XLXDREPO=https://github.com/LX3JL/xlxd.git XLXDREPO=https://github.com/LX3JL/xlxd.git
DMRIDURL=http://xlxapi.rlx.lu/api/exportdmr.php DMRIDURL=http://xlxapi.rlx.lu/api/exportdmr.php
@ -25,6 +25,7 @@ XLXINSTDIR=/root/reflector-install-files/xlxd
DEP="wget git build-essential g++ apache2 php libapache2-mod-php php7.0-mbstring" DEP="wget git build-essential g++ apache2 php libapache2-mod-php php7.0-mbstring"
DEP2="wget git build-essential g++ apache2 php libapache2-mod-php php7.3-mbstring" DEP2="wget git build-essential g++ apache2 php libapache2-mod-php php7.3-mbstring"
DEP3="wget git build-essential g++ apache2 php libapache2-mod-php php-curl php-json php-cgi php7.4-mbstring snapd figlet" DEP3="wget git build-essential g++ apache2 php libapache2-mod-php php-curl php-json php-cgi php7.4-mbstring snapd figlet"
APPS="git git-core apache2 php libapache2-mod-php php-cli php-xml php-mbstring php-curl build-essential"
VERSION=$(sed 's/\..*//' /etc/debian_version) VERSION=$(sed 's/\..*//' /etc/debian_version)
clear clear
echo "" echo ""
@ -47,18 +48,19 @@ echo "Making install directories and installing dependicies...."
echo "------------------------------------------------------------------------------" echo "------------------------------------------------------------------------------"
mkdir -p $XLXINSTDIR mkdir -p $XLXINSTDIR
mkdir -p $WEBDIR mkdir -p $WEBDIR
apt-get update apt-get -y update
if [ $VERSION = 9 ] apt-get -y install $APPS
then #if [ $VERSION = 9 ]
apt-get -y install $DEP #then
a2enmod php7.0 # apt-get -y install $DEP
elif [ $VERSION = 10 ] # a2enmod php7.0
then #elif [ $VERSION = 10 ]
apt-get -y install $DEP2 #then
elif [ $VERSION = 11 ] # apt-get -y install $DEP2
then #elif [ $VERSION = 11 ]
apt-get install -y $DEP3 #then
fi # apt-get -y install $DEP3
#fi
echo "------------------------------------------------------------------------------" echo "------------------------------------------------------------------------------"
if [ -e $XLXINSTDIR/xlxd/src/xlxd ] if [ -e $XLXINSTDIR/xlxd/src/xlxd ]
@ -121,6 +123,7 @@ sed -i "s/ysf-xlxd/xlxd/g" /etc/apache2/sites-available/$XLXDOMAIN.conf
chown -R www-data:www-data /var/www/xlxd/ chown -R www-data:www-data /var/www/xlxd/
chown -R www-data:www-data /xlxd/ chown -R www-data:www-data /xlxd/
a2ensite $XLXDOMAIN a2ensite $XLXDOMAIN
a2dissite 000-default
# revert certbot make this an option! for another day # revert certbot make this an option! for another day
#if [ $VERSION = 11 ] #if [ $VERSION = 11 ]
#then #then