[SCM] live-studio branch, master, updated. 541f1b2730aff7ac70fe20cc8be60d95fe44be44
Chris Lamb
lamby at debian.org
Fri Jul 30 09:21:45 UTC 2010
The following commit has been merged in the master branch:
commit 9dea6075839a9a8776d2a2ba6b60a1a6a3d0ff80
Author: Chris Lamb <lamby at debian.org>
Date: Fri Jul 30 02:00:00 2010 -0400
Stub out gunicorn configuration
diff --git a/debian/control b/debian/control
index 396e38d..8695294 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Standards-Version: 3.9.1
Package: live-studio
Architecture: all
-Depends: ${misc:Depends}, python-django (>= 1.2), python-psycopg2, python-memcache, python-django-registration, nginx
+Depends: ${misc:Depends}, python-django (>= 1.2), python-psycopg2, python-memcache, python-django-registration, nginx, gunicorn
Description: Debian Live - Web based front-end
live-studio is a web frontend to the Debian Live tools. It offers users of any
operating system to customise, build and then download a Debian Live system
diff --git a/debian/live-studio.init b/debian/live-studio.init
new file mode 100644
index 0000000..6d8db65
--- /dev/null
+++ b/debian/live-studio.init
@@ -0,0 +1,85 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: live-studio
+# Required-Start: $syslog
+# Required-Stop: $syslog
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+NAME=live-studio
+DESC=${NAME}
+
+USER=www-data
+GROUP=www-data
+
+RUNDIR=/usr/lib/pymodules/python2.5/live_studio/
+DAEMON=/usr/bin/gunicorn_django
+PIDFILE=/var/run/${NAME}.pid
+LOGFILE=/var/log/live-studio/gunicorn.log
+
+test -x ${DAEMON} || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+
+ if [ "$(id -u)" -ne 0 ]
+ then
+ echo "failed: must be called as root"
+ exit 1
+ fi
+
+ if start-stop-daemon --start --oknodo --quiet --chdir ${RUNDIR} --pidfile ${PIDFILE} \
+ --exec ${DAEMON} -- \
+ --pid=${PIDFILE} \
+ --daemon \
+ --user=${USER} \
+ --group=${GROUP} \
+ --bind=127.0.0.1:8000 \
+ --workers=4 \
+ --log-file=${LOGFILE} \
+ settings
+ then
+ echo "${NAME}."
+ else
+ echo "failed"
+ exit 1
+ fi
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+
+ if [ "$(id -u)" -ne 0 ]
+ then
+ echo "failed: must be called as root"
+ exit 1
+ fi
+
+ if start-stop-daemon --stop --oknodo --quiet --retry 10 --pidfile ${PIDFILE}
+ then
+ echo "${NAME}."
+ rm -f ${PIDFILE}
+ else
+ echo "failed"
+ exit 1
+ fi
+ ;;
+
+ restart|force-reload)
+ ${0} stop
+ ${0} start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--
live-studio
More information about the debian-live-changes
mailing list