diff --git a/debian/changelog b/debian/changelog index 670a23a..536f2f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -stacktach (1.0) unstable; urgency=low +stacktach (1.0) precise-havana; urgency=low * Initial - -- Vladimir Eremin Wed, 19 Mar 2014 12:52:15 +0400 + -- Vladimir Eremin Wed, 19 Mar 2014 15:03:53 +0400 diff --git a/debian/control b/debian/control index f892466..0722bbb 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,6 @@ Package: stacktach Architecture: all XB-Python-Version: ${python:Versions} Depends: ${python:Depends}, - nginx, python-mysqldb, + python-mysqldb, python-django (>= 1.4.2), python-django-south, python-kombu Description: OpenStack Tachometer diff --git a/debian/rules b/debian/rules index 4383732..78e244c 100755 --- a/debian/rules +++ b/debian/rules @@ -11,5 +11,6 @@ install/stacktach:: rm -f $(CURDIR)/debian/stacktach/usr/share/stacktach/local_settings.py mkdir -p $(CURDIR)/debian/stacktach/usr/share/stacktach/stacktach ln -s /etc/stacktach/local_settings.py $(CURDIR)/debian/stacktach/usr/share/stacktach/local_settings.py + rm -f $(CURDIR)/debian/stacktach/etc/init.d/stacktach-worker mkdir -p $(CURDIR)/debian/stacktach/etc/init.d - mv $(CURDIR)/debian/stacktach/usr/share/stacktach/worker/stacktach.sh $(CURDIR)/debian/stacktach/etc/init.d/stacktach-worker + ln -s /usr/share/stacktach/worker/stacktach.sh $(CURDIR)/debian/stacktach/etc/init.d/stacktach-worker diff --git a/etc/init/stacktach.conf b/etc/init/stacktach.conf index e6009aa..9e692a2 100644 --- a/etc/init/stacktach.conf +++ b/etc/init/stacktach.conf @@ -1,3 +1,3 @@ respawn -exec sudo -u stacktach bash -c 'source /etc/default/stacktach; $STACKTACH_INSTALL_DIR/manage.py runserver --insecure' +exec sudo -u stacktach bash -c 'source /etc/default/stacktach; exec $STACKTACH_INSTALL_DIR/manage.py runserver --insecure' diff --git a/worker/stacktach.sh b/worker/stacktach.sh index f004cd7..9577f2c 100755 --- a/worker/stacktach.sh +++ b/worker/stacktach.sh @@ -26,7 +26,12 @@ case "$1" in start) echo "Starting stacktach workers" cd $WORKDIR - /sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS + if id -un stacktach >/dev/null 2>&1 + then + /sbin/start-stop-daemon --start --pidfile $PIDFILE --chuid stacktach --make-pidfile -b --exec $DAEMON $ARGS + else + /sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS + fi ;; stop) echo "Stopping stacktach workers"