From e3fba625eaf9e100b7b0dea60f3cb1d0e5925a76 Mon Sep 17 00:00:00 2001 From: "Jason D. McCormick" Date: Sat, 25 Jan 2020 13:33:06 -0500 Subject: [PATCH] fix for debian 10 --- xlxd-debian-installer.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xlxd-debian-installer.sh b/xlxd-debian-installer.sh index 8b578e9..331a9d7 100755 --- a/xlxd-debian-installer.sh +++ b/xlxd-debian-installer.sh @@ -22,7 +22,20 @@ XLXDREPO=https://github.com/LX3JL/xlxd.git DMRIDURL=http://xlxapi.rlx.lu/api/exportdmr.php WEBDIR=/var/www/xlxd XLXINSTDIR=/root/reflector-install-files/xlxd -DEP="git build-essential apache2 php libapache2-mod-php php7.0-mbstring" + +# determine whick packages are needed based on Debian version +DEBVER=`/bin/sed -r 's/([0-9]+)\..*$/\1/' /etc/debian_version` +case $DEBVER in + 7|8|9) + DEP="git build-essential apache2 php libapache2-mod-php php7.0-mbstring" + AMOD="php7.0" + ;; + *) + DEP="git build-essential apache2 php7.3 libapache2-mod-php7.3 php7.3-mbstring" + AMOD="php7.3" + ;; +esac + clear echo "" echo "XLX uses 3 digit numbers for its reflectors. For example: 032, 999, 099." @@ -46,7 +59,7 @@ mkdir -p $XLXINSTDIR mkdir -p $WEBDIR apt-get update apt-get -y install $DEP -a2enmod php7.0 +a2enmod $AMOD echo "------------------------------------------------------------------------------" if [ -e $XLXINSTDIR/xlxd/src/xlxd ] then