Skip to content

Instantly share code, notes, and snippets.

@guiguiboy
Created September 30, 2013 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guiguiboy/6768022 to your computer and use it in GitHub Desktop.
Save guiguiboy/6768022 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Enable/Disable phpmyadmin on the server"
if [ "$#" -ne 1 ];then
echo "Usage pma.sh [up|down]"
exit 0
fi
if [ "$1" = "up" ];then
cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
service apache2 reload
elif [ "$1" = "down" ];then
rm /etc/apache2/conf.d/phpmyadmin.conf
service apache2 reload
else
echo "Usage pma.sh [up|down]"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment