Commit 017d5acb authored by Christoph Berg's avatar Christoph Berg

pg_createcluster: Create /var/run/postgresql when missing.

parent eadaba5b
postgresql-common (151) UNRELEASED; urgency=low
* pg_createcluster: Create /var/run/postgresql when missing.
* pg_virtualenv: Set PG_CONFIG in single version mode.
* pg_wrapper: Always use the latest available version of "pg_isready"
instead of the target cluster's. pg_isready appeared only in 9.3, but is
......
......@@ -381,9 +381,12 @@ PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'data_directory'
setup_pg_hba $version if $newcluster and not $explicit_auth_config;
# configure socket directory
if (! $socketdir && ! -e '/var/run/postgresql') {
system 'install', '-d', '-o', $postgres_user[2], '-g', $postgres_user[3], '/var/run/postgresql';
}
if ($socketdir && ! -e $socketdir) {
if (system 'install', '-d', '-m', '0755', '-o', $owneruid, '-g', $ownergid, $socketdir) {
error 'could not create socket directory';
error "could not create socket directory $socketdir";
}
}
$orig_euid = $>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment