summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-04 17:36:19 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:57 -0400
commit8be1d5385f2f4eb85ffc46db73f964428563af8e (patch)
tree473a625f3e5843624d7d00b1b0f1b1657e439b6f /meta-openstack/recipes-devtools
parent9317870c266b1c3b25ba87dce680bb15de401a21 (diff)
downloadmeta-cloud-services-8be1d5385f2f4eb85ffc46db73f964428563af8e.tar.gz
python-glance: Create log directory in initscript
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/glance.init4
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_2013.1.bb9
2 files changed, 12 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance.init b/meta-openstack/recipes-devtools/python/python-glance/glance.init
index 7a269d6..c61abaa 100644
--- a/meta-openstack/recipes-devtools/python/python-glance/glance.init
+++ b/meta-openstack/recipes-devtools/python/python-glance/glance.init
@@ -28,6 +28,10 @@ start()
28 fi 28 fi
29 fi 29 fi
30 30
31 if [ ! -d /var/log/glance ]; then
32 mkdir /var/log/glance
33 fi
34
31 echo -n "Starting $DESC..." 35 echo -n "Starting $DESC..."
32 36
33 start-stop-daemon --start --quiet --background \ 37 start-stop-daemon --start --quiet --background \
diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
index 99d1577..a64ac9e 100644
--- a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
@@ -58,7 +58,14 @@ pkg_postinst_${SRCNAME} () {
58 exit 1 58 exit 1
59 fi 59 fi
60 60
61 mkdir /var/log/glance 61 # This is to make sure postgres is configured and running
62 if ! pidof postmaster > /dev/null; then
63 sudo -u postgres initdb -D /etc/postgresql/
64 /etc/init.d/postgresql start
65 sleep 0.5
66 sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'"
67 fi
68
62 # Needed when using a MySQL backend 69 # Needed when using a MySQL backend
63 # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" 70 # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;"
64 sudo -u postgres createdb glance 71 sudo -u postgres createdb glance