Skip to content

Commit

Permalink
Add hard restart on md5 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
omega committed May 28, 2012
1 parent 9aa0d9d commit 5cbbaa7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repull
Expand Up @@ -11,9 +11,10 @@ if [ -f "projects.md5" ]; then
fi
echo "$md5" > projects.md5
reload=0
restart=0
if [ "$md5" != "$old_md5" ]; then
echo "new projects found, reloading, '$md5' '$old_md5'"
reload=1
restart=1
fi

for P in $PROJECTS; do
Expand Down Expand Up @@ -46,7 +47,11 @@ elif [ "$status" == "2" ]; then
echo "no running server, starting"
./starter
else
if [ "$reload" == "1" ]; then
if [ "$restart" == "1" ]; then
echo "stopping and starting, new projects"
./stopper
./starter
elif [ "$reload" == "1" ]; then
echo "reloading.."
./reloader
fi
Expand Down

0 comments on commit 5cbbaa7

Please sign in to comment.