Created
June 21, 2018 01:03
-
-
Save phptek/931dbec61ad66a8fc176edf8274080c2 to your computer and use it in GitHub Desktop.
switchphp
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/bash | |
# Assumes Apache httpd | |
# Russell Michell 2018 <russellmichell+usevagrant@catalyst.net.nz> | |
from=$1 | |
to=$2 | |
update-alternatives --set php /usr/bin/php$to && a2dismod php$from && a2enmod php$to && service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment