Skip to content

Instantly share code, notes, and snippets.

View pplante's full-sized avatar
🐶

phil plante pplante

🐶
View GitHub Profile
@pplante
pplante / post-receive.sh
Created October 22, 2012 04:28 — forked from stas/post-receive.sh
Heroku like deployment git hooks
#!/bin/bash
# (Re)spawn the application
function spawn () {
local ps_name=$1
local spawn_cmd=$2
local pids=`ps -C $ps_name -o pid=`
if [ ${#pids} -ne 0 ]
then
echo "Sending TERM to $pids..."