Last active
December 5, 2016 13:13
-
-
Save leonardreidy/7771c11856e1b2038df6393b3a4b7056 to your computer and use it in GitHub Desktop.
Bash function for starting and stopping xampp from the command line on Ubuntu
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
# Bash function for starting and stopping xampp from the command line on Ubuntu | |
function xampp() { | |
# If the argument supplied to the function is --stop | |
if [[ $@ == "--stop" ]]; | |
then | |
# stop the xampp/lampp services | |
sudo bash /opt/lampp/lampp stop | |
# If the argument supplied to the function is --start | |
elif [[ $@ == "--start" ]]; | |
then | |
# start the xampp/lampp services | |
sudo bash /opt/lampp/lampp start | |
else | |
echo "usage: xampp [--start] [--stop]" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment