| 1 |
# Start script to run pgcluu_collectd as daemon |
| 2 |
# |
| 3 |
# Feel free to modify the name of the PostgreSQL service and the paths following |
| 4 |
# your installation. |
| 5 |
# |
| 6 |
|
| 7 |
[Unit] |
| 8 |
Description=Postgresql performance and auditing statistics collecting |
| 9 |
Documentation=man:pgcluu(1) |
| 10 |
After=postgresql.service |
| 11 |
Wants=postgresql.service |
| 12 |
|
| 13 |
|
| 14 |
[Service] |
| 15 |
Type=forking |
| 16 |
PermissionsStartOnly=true |
| 17 |
User=postgres |
| 18 |
Environment=STATDIR=/var/lib/pgcluu/data |
| 19 |
Environment=PIDFILE=/run/postgresql/pgcluu_collectd.pid |
| •20 |
ExecStart=/usr/bin/pgcluu_collectd --daemonize --rotate-daily --pid-file $PIDFILE $STATDIR |
| 21 |
ExecStop=/usr/bin/pgcluu_collectd -k --pid-file $PIDFILE |
| 22 |
KillMode=process |
| 23 |
Restart=on-failure |
| 24 |
RestartSec=60s |
| 25 |
PIDFile=/run/postgresql/pgcluu_collectd.pid |
| 26 |
|
| 27 |
[Install] |
| 28 |
WantedBy=multi-user.target |
| 29 |
|