Added function to kill daemonized rails server

pull/720/head
Matt Broyles 2016-05-16 20:17:47 -05:00
parent 13b643e93e
commit 871472d93d
1 changed files with 11 additions and 0 deletions

11
lib/killrails.bash 100644
View File

@ -0,0 +1,11 @@
# Quick function to kill a daemonized Rails server
function killrails() {
railsPid="$(cat tmp/pids/server.pid)"
if [ ! -z "$railsPid" ]; then
echo "[OK] Rails Server Process Id : ${railsPid}"
kill -9 $railsPid
echo "[OK] Process Killed"
else
echo "[FAIL] Error killing Rails server"
fi
}