File: pg_receivewal%40.service

package info (click to toggle)
postgresql-common 282
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,528 kB
  • sloc: perl: 4,170; sh: 1,572; makefile: 327; sql: 13; ansic: 10
file content (21 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Unit]
Description=WAL archival of PostgreSQL Cluster %i
AssertPathExists=/etc/postgresql/%I/postgresql.conf
Wants=postgresql@%i.service
After=postgresql@%i.service
RequiresMountsFor=/var/backups/postgresql

[Service]
Type=simple
User=postgres
ExecStartPre=+/usr/bin/pg_backupcluster %i createdirectory
ExecStart=/usr/bin/pg_backupcluster $RECEIVEWAL_ARGS %i receivewal
Restart=on-failure
RestartSec=1min
# pg_receivewal only flushes compressed output on SIGINT
# (https://www.postgresql.org/message-id/flat/Yvo/5No5S0c4EFMj%40msg.df7cb.de)
KillSignal=SIGINT

[Install]
# when enabled, start along with postgresql@%i
WantedBy=postgresql@%i.service