Created
February 16, 2015 05:55
-
-
Save evilmarty/ed5b3cddf422bdce1d0a to your computer and use it in GitHub Desktop.
Revisions
-
evilmarty created this gist
Feb 16, 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,23 @@ #!/bin/sh cwd=$(pwd) process=$1 procfile="$cwd/Procfile" if [ ! -r $procfile ] ; then echo "$procfile does not exist or is not readable" exit -1 fi if [[ ! "$process" ]] ; then process="web" fi command=`cat $procfile | grep -m 1 -e $process: | sed -E 's/[^:]+:\s*//'` if [[ ! "$command" ]] ; then echo "No command found for $process" exit -1 fi $command