Skip to content

Instantly share code, notes, and snippets.

@RafikFarhad
Created July 16, 2019 19:58
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 RafikFarhad/afe8d81ee9c3565da8e24247f581685f to your computer and use it in GitHub Desktop.
Save RafikFarhad/afe8d81ee9c3565da8e24247f581685f to your computer and use it in GitHub Desktop.
#!/bin/bash
mode=$1
if [ "$mode" = "stop" ]
then
echo -e "Stopping Services..."
sudo service nginx stop
sudo service mysql stop
sudo service php7.3-fpm stop
sudo service redis-server stop
echo -e "!~Enjoy~!"
else if [ "$mode" = "start" ]
then
echo -e "Starting Services..."
sudo service nginx start
sudo service mysql start
sudo service php7.3-fpm start
sudo service redis-server start
echo -e "!~Enjoy~!"
else
echo "Command Not Found. Possible Commands [ start|stop ]"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment