forked from switnet/quick-jibri-installer
Improve repo checks, add new packages, ...
...enable sharing of external folder, and add db checks
This commit is contained in:
parent
d29dea7fef
commit
2c46e87c68
|
@ -49,6 +49,7 @@ fi
|
||||||
done
|
done
|
||||||
DISTRO_RELEASE="$(lsb_release -sc)"
|
DISTRO_RELEASE="$(lsb_release -sc)"
|
||||||
DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')
|
DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++')
|
||||||
|
PHP_REPO=$(apt-cache policy | grep http | grep php | head -n 1 | awk '{print $2}' | cut -d "/" -f5)
|
||||||
PHPVER="7.4"
|
PHPVER="7.4"
|
||||||
PSGVER="$(apt-cache madison postgresql | head -n1 | awk '{print $3}' | cut -d "+" -f1)"
|
PSGVER="$(apt-cache madison postgresql | head -n1 | awk '{print $3}' | cut -d "+" -f1)"
|
||||||
PHP_FPM_DIR="/etc/php/$PHPVER/fpm"
|
PHP_FPM_DIR="/etc/php/$PHPVER/fpm"
|
||||||
|
@ -87,10 +88,12 @@ if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" =
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
add_php74() {
|
add_php74() {
|
||||||
if [ "$(dpkg-query -W -f='${Status}' "php$PHPVER-fpm" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
|
if [ "$PHP_REPO" = "php" ]; then
|
||||||
echo "PHP $PHPVER already installed"
|
echo "PHP $PHPVER already installed"
|
||||||
|
apt-get -q2 update
|
||||||
|
apt-get -yq2 dist-upgrade
|
||||||
else
|
else
|
||||||
echo "# Adding PHP $PHPVER Repository"
|
echo "# Adding Ondrej PHP $PHPVER PPA Repository"
|
||||||
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C
|
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C
|
||||||
echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
|
echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
|
||||||
apt-get update -q2
|
apt-get update -q2
|
||||||
|
@ -109,6 +112,7 @@ install_ifnot postgresql-$PSGVER
|
||||||
add_php74
|
add_php74
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
php$PHPVER-fpm \
|
php$PHPVER-fpm \
|
||||||
|
php$PHPVER-bcmath \
|
||||||
php$PHPVER-bz2 \
|
php$PHPVER-bz2 \
|
||||||
php$PHPVER-curl \
|
php$PHPVER-curl \
|
||||||
php$PHPVER-gd \
|
php$PHPVER-gd \
|
||||||
|
@ -424,6 +428,7 @@ Fixing possible missing tables...
|
||||||
"
|
"
|
||||||
echo "y"|sudo -u www-data php $NC_PATH/occ db:convert-filecache-bigint
|
echo "y"|sudo -u www-data php $NC_PATH/occ db:convert-filecache-bigint
|
||||||
sudo -u www-data php $NC_PATH/occ db:add-missing-indices
|
sudo -u www-data php $NC_PATH/occ db:add-missing-indices
|
||||||
|
sudo -u www-data php $NC_PATH/occ db:add-missing-columns
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
Adding trusted domain...
|
Adding trusted domain...
|
||||||
|
|
Loading…
Reference in New Issue