Permalink
Browse files

Add command in the start option to stop the service if it was already…

… started.
  • Loading branch information...
1 parent 27d8275 commit f9a95a8afcb4193153dcf9d18e340612f994f412 Arthur Furlan committed May 3, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 etc/init.d/gunicorn_django
@@ -44,6 +44,9 @@ _do_start_project()
# 3 if configuration file does not exist
[ ! -r /etc/default/$NAME ] && return 3
+ # Stop the service if it's actually running
+ [ -f $PIDFILE ] && _do_stop_project $1
+
# Read project configuration variable file
. /etc/default/$NAME

0 comments on commit f9a95a8

Please sign in to comment.