Created
July 24, 2015 14:13
-
-
Save egabancho/7abf2561c02ea801545d to your computer and use it in GitHub Desktop.
Revisions
-
egabancho revised this gist
Jul 24, 2015 . No changes.There are no files selected for viewing
-
egabancho created this gist
Jul 24, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ function service { # Needs brew services installed: brew tap homebrew/services # $1 the service and $2 the action # service mysql stop # service mysql status if [ $2 == "status" ]; then STATUS=`brew services ls | grep --color=never $1` if [ -n "$STATUS" ]; then echo $STATUS else echo "$1 not running, maybe 'service $1 start'" fi else brew services $2 $1 fi }