summaryrefslogtreecommitdiffstats
path: root/postgresql.service.in
Commit message (Collapse)AuthorAgeFilesLines
* init: add PGSTARTTIMEOUT config env variablePavel Raiskup2015-03-191-2/+8
| | | | | | | | | * postgresql.init.in (PGSTARTTIMEOUT): New variable. (start): Use postgresql-ctl and respect PGSTARTTIMEOUT. * postgresql.service.in: Better document the timeouts. (PGSTARTTIMEOUT): New env variable. (ExecStart): Respect PGSTARTTIMEOUT. * NEWS: Document.
* postgresql-ctl: fix SCLs & SELinuxPavel Raiskup2015-03-181-5/+6
| | | | | | | * postgresql.init.in: Use 'postgres' binary instead of 'postmaster', because it has proper selinux context. * postgresql.service.in: Use postgresql-ctl everywhere, to make sure that correct selinux context is used even with SCL.
* configury: another scl-izing commitPavel Raiskup2015-02-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.am: Move systemd directory definitions into configure.ac. This is then easily configurable via config.site. * configure.ac (PGENGINE, PG_CTL_BIN): Remove, bindir is sufficient. (PREVMAJORVERSION, PREVPGENGINE): Removed. It si configurable now. (INIDB_SCLS): Generalize into SCLS variable. (SCLS): Moved from INIDB_SCLS. (PGDATADIR): Default changed to have ${prefix} inside. (SED_RULES): Remove unused variables (or to not be used, TODO for next commit). (conf_dir): New macro to define config.site friendly directory variable. (SCL_SHELL_WRAPPER): Convenient macro to generate appropriate call to scl binary (only when building for software collections). * postgresql-check-db-dir.in: Use new variable layout. * postgresql-ctl.in: Likewise. * postgresql-setup.in: Likewise. * postgresql.service.in: Likewise. This fixes regression of not using ${bindir} properly.
* postgresql.service: un-link with postgresql@.servicePavel Raiskup2014-09-161-1/+1
| | | | | | | | We need to create both files separately as (a) the 'postgresql.service' can not .include 'postgresql@.service' for some reason, /usr/lib/ drop-in breaks things (rhbz#1141824) and we want to have PGDATA unset for postgresql@.service, unlike the postgresql.service file.
* postgresql-setup: don't expect /etc/postgresql/* existsPavel Raiskup2014-09-161-5/+6
| | | | | | | | That concept was against systemd intentions. From now we should stop using .include statement in service files and encourage people using the systemd's drop-in feature. That complicates things a little, at least until the rhbz#1139148 is not resolved somehow.
* service: avoid cryptic failure with old configPavel Raiskup2014-07-041-1/+1
| | | | | | | | | | | | | | | If user removes currently provided /etc/postgresql/postgresql configuration file, PGDATA env variable is not set. The `systemctl start postgresql` would fail similarly to `systemctl start postgresql@NOTCONFIGURED` when the configuration file was not created yet with cryptic message "Usage: ... " Stop this behavior rather explicitly with proper error in check-db-dir script. Warn also user in similar fashion that the configuration should be adjusted in case the PGDATA was set directly in service file.
* postgresql.service.in: use %N, not %pPavel Raiskup2014-07-011-1/+1
| | | | | | | | The %N expands into postgresql@PATTERN when you run systemctl start postgresql@PATTERN.service. The %p expanded only to "postgresql". Also make the existance of this file optional by dash-prefixing.
* postgresql-check-db-dir generated alsoPavel Raiskup2014-07-011-1/+1
| | | | | Also generate files using sed as is suggested by autoconf manual (and the autoconf project does so internally).
* Generate postgresql.service and configuration filePavel Raiskup2014-07-011-0/+42