#!/bin/sh -e

# Remove unix_socket_directory from the pg80 configuration and check that the
# socket is still created in /var/run/postgresql.

sed -i '/^unix_socket_directory/d' /etc/postgresql/8.0/pg80/postgresql.conf
pg_ctlcluster -s 8.0 pg80 restart
pg_lsclusters
echo "Socket directory:"
ls -a /var/run/postgresql/
su -s /bin/sh -c 'psql -l --cluster 8.0/pg80' postgres
