]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Create horizon user/group and use it on apache wsgi
authorGhe Rivero <ghe@debian.org>
Tue, 6 Mar 2012 07:16:17 +0000 (08:16 +0100)
committerGhe Rivero <ghe@debian.org>
Tue, 6 Mar 2012 07:17:02 +0000 (08:17 +0100)
Rewritten-From: 1088d76799644ec67892bbb4bb2c00528da617e5

xenial/debian/openstack-dashboard-apache.conf
xenial/debian/openstack-dashboard.postinst [new file with mode: 0644]
xenial/debian/openstack-dashboard.postrm [new file with mode: 0644]

index a3a62942523a7df3d9dd07139d7f279f250148a1..08081ac4e23188f46cf5091e978b3226070590fb 100644 (file)
@@ -1,6 +1,8 @@
 Listen 8080
 <VirtualHost *:8080>
     WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
+    WSGIDaemonProcess openstack-dashboard user=horizon group=horizon
+    WSGIProcessGroup openstack-dashboard
 
     <Directory />
         AllowOverride None
diff --git a/xenial/debian/openstack-dashboard.postinst b/xenial/debian/openstack-dashboard.postinst
new file mode 100644 (file)
index 0000000..189fb92
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "configure" ]
+then
+    adduser --system \
+       --home /var/lib/horizon \
+        --quiet \
+        --disabled-password \
+        --group horizon
+fi
+
+#DEBHELPER#
\ No newline at end of file
diff --git a/xenial/debian/openstack-dashboard.postrm b/xenial/debian/openstack-dashboard.postrm
new file mode 100644 (file)
index 0000000..7936ba5
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+case $1 in
+    purge)
+        userdel horizon || true
+        groupdel horizon || true
+        ;;
+esac
+
+#DEBHELPER#
\ No newline at end of file