Created
May 31, 2018 09:01
-
-
Save roma-glushko/055303648fa2efcfd8f01481a303b3b2 to your computer and use it in GitHub Desktop.
A bash script to toggle xdebug module
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/env bash | |
# Simple script to enable or disable the xdebug extension | |
case $1 in | |
on) | |
sudo sudo phpenmod xdebug | |
sudo service apache2 restart | |
echo "Xdebug is ON" | |
;; | |
off) | |
sudo sudo phpdismod xdebug | |
sudo service apache2 restart | |
echo "Xdebug is OFF" | |
;; | |
*) | |
if [ -f /etc/php/7.0/mods-available/xdebug.ini ]; then | |
. ~/scripts/xdebug.bash off | |
else | |
. ~/scripts/xdebug.bash on | |
fi | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment