summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-instaweb.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index d96eddb..80a7f74 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -73,6 +73,11 @@ resolve_full_httpd () {
}
start_httpd () {
+ if test -f "$fqgitdir/pid"; then
+ say "Instance already running. Restarting..."
+ stop_httpd
+ fi
+
# here $httpd should have a meaningful value
resolve_full_httpd