Added function to kill daemonized rails server
This commit is contained in:
11
lib/killrails.bash
Normal file
11
lib/killrails.bash
Normal 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user