Update tools.func
This commit is contained in:
parent
cc7b4102bb
commit
f50126511a
@ -353,11 +353,12 @@ install_php() {
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
else
|
||||
CURRENT_PHP=""
|
||||
msg_info "Setup PHP: $PHP_VERSION"
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
|
||||
$STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
|
||||
if [[ -z "$CURRENT_PHP" ]]; then
|
||||
msg_info "Setup PHP $PHP_VERSION"
|
||||
elif [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
|
||||
msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
|
||||
if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then
|
||||
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
|
Loading…
x
Reference in New Issue
Block a user