Created
July 21, 2020 07:38
-
-
Save haljeshi/329a0fb0c6df43f3fc904d716a96af1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FROMVERSION=$(php -v|grep --only-matching --perl-regexp "(PHP )\d+\.\\d+\.\\d+"|cut -c 5-7); | |
TOVERSION="$1" | |
update-alternatives --set php /usr/bin/php$TOVERSION | |
a2dismod php$FROMVERSION | |
a2enmod php$TOVERSION | |
service apache2 restart | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment