Last active
January 24, 2019 16:36
-
-
Save marcialsoto/52f7db75874f0952a9fb4f33f34d62ec to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| if [ "$1" -eq 72 ]; then | |
| echo "Cambiando a PHP 7.2" | |
| sudo a2dismod php5.6 | |
| sudo a2enmod php7.2 | |
| sudo service apache2 restart | |
| sudo update-alternatives --set php /usr/bin/php7.2 | |
| sudo update-alternatives --set phar /usr/bin/phar7.2 | |
| sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.16 | |
| sudo update-alternatives --set phpize /usr/bin/phpize7.2 | |
| sudo update-alternatives --set php-config /usr/bin/php-config7.2 | |
| sudo service apache2 restart | |
| php -v | |
| elif [ "$1" -eq 56 ]; then | |
| echo "Cambiando a PHP 5.6" | |
| sudo a2dismod php7.2 | |
| sudo a2enmod php5.6 | |
| sudo service apache2 restart | |
| sudo update-alternatives --set php /usr/bin/php5.6 | |
| sudo update-alternatives --set phar /usr/bin/phar5.6 | |
| sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.16 | |
| sudo update-alternatives --set phpize /usr/bin/phpize5.6 | |
| sudo update-alternatives --set php-config /usr/bin/php-config5.6 | |
| sudo service apache2 restart | |
| php -v | |
| else | |
| echo "Versión no válida" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment