~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/launchpad-database-setup

  • Committer: Curtis Hovey
  • Date: 2010-09-18 03:10:24 UTC
  • mto: This revision was merged to the branch mainline in revision 11572.
  • Revision ID: curtis.hovey@canonical.com-20100918031024-epvsr7jtz1rtl3d3
Updated launchpad-database-setup to work in maverick and pre-Maverick envs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  echo "ensure postgres is running on port 5432."
42
42
fi;
43
43
 
44
 
sudo /etc/init.d/postgresql stop $pgversion
 
44
if [ -e /etc/init.d/postgresql-$pgversion ]; then
 
45
    sudo /etc/init.d/postgresql-$pgversion stop
 
46
else
 
47
    # This is Maverick.
 
48
    sudo /etc/init.d/postgresql stop $pgversion
 
49
fi
45
50
 
46
51
echo Purging postgresql data...
47
52
sudo pg_dropcluster $pgversion main --stop-server
99
104
EOF
100
105
fi
101
106
 
102
 
sudo /etc/init.d/postgresql start $pgversion
 
107
if [ -e /etc/init.d/postgresql-$pgversion ]; then
 
108
    sudo /etc/init.d/postgresql-$pgversion start
 
109
else
 
110
    # This is Maverick.
 
111
    sudo /etc/init.d/postgresql start $pgversion
 
112
fi
103
113
 
104
114
echo Waiting 10 seconds for postgresql to come up...
105
115
sleep 10