Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Last active January 7, 2016 14:44
Show Gist options
  • Save mario21ic/ca8776485e3984c865cb to your computer and use it in GitHub Desktop.
Save mario21ic/ca8776485e3984c865cb to your computer and use it in GitHub Desktop.
Script to start | stop | restart environment lamp
#!/bin/bash
ACTION='start'
if [ -n "$1" ];
then
ACTION=$1
fi
sudo /etc/init.d/apache2 $ACTION
sudo /etc/init.d/mysql $ACTION
sudo /etc/init.d/memcached $ACTION
sudo /etc/init.d/mongodb $ACTION
sudo /etc/init.d/redis-server $ACTION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment