diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-16 13:40:07 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-22 12:46:30 +0000 |
commit | 537e32bdcd6777f1cfecb526b1ffaaf2604eefba (patch) | |
tree | ee498193bdf0fee237a0b02f53c042b10b6ab988 /openstack/usr/share/openstack/postgres-setup | |
parent | e3c2492c9463d7cd47d06ed4040d8c6c21235313 (diff) | |
download | definitions-537e32bdcd6777f1cfecb526b1ffaaf2604eefba.tar.gz |
FIXUPME: Add workaround to avoid failure on reboot of some setup services
Diffstat (limited to 'openstack/usr/share/openstack/postgres-setup')
-rw-r--r-- | openstack/usr/share/openstack/postgres-setup | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openstack/usr/share/openstack/postgres-setup b/openstack/usr/share/openstack/postgres-setup index 36d89d97..69ee2391 100644 --- a/openstack/usr/share/openstack/postgres-setup +++ b/openstack/usr/share/openstack/postgres-setup @@ -15,7 +15,11 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -set -xe +set -e + +if [ -f /var/openstack/postgres-setup ]; then + exit 0 +fi # Create postgres directories install -dm700 /var/lib/pgsql/data @@ -31,5 +35,8 @@ chown -R postgres:postgres /var/lib/pgsql /var/run/postgresql test -d /var/lib/pgsql/data/base || sudo -u postgres pg_ctl -D /var/lib/pgsql/data initdb +install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/postgres-setup +Postgres setup: success +EOF exit 0 |