mirror of
https://gitea.0xace.cc/ansible-galaxy/pgbouncer.git
synced 2024-11-25 05:06:39 +00:00
28 lines
739 B
Plaintext
28 lines
739 B
Plaintext
|
[Unit]
|
||
|
Description=pgBouncer connection pooling for PostgreSQL
|
||
|
After=syslog.target network.target
|
||
|
|
||
|
[Service]
|
||
|
Type=forking
|
||
|
|
||
|
User=postgres
|
||
|
Group=postgres
|
||
|
|
||
|
PermissionsStartOnly=true
|
||
|
ExecStartPre=-/bin/mkdir -p /var/run/pgbouncer {{ pgbouncer_log_dir }}
|
||
|
ExecStartPre=/bin/chown -R postgres:postgres /var/run/pgbouncer {{ pgbouncer_log_dir }}
|
||
|
{% if ansible_os_family == "Debian" %}
|
||
|
ExecStart=/usr/sbin/pgbouncer -d {{ pgbouncer_conf_dir }}/pgbouncer.ini
|
||
|
{% endif %}
|
||
|
{% if ansible_os_family == "RedHat" %}
|
||
|
ExecStart=/usr/bin/pgbouncer -d {{ pgbouncer_conf_dir }}/pgbouncer.ini
|
||
|
{% endif %}
|
||
|
ExecReload=/bin/kill -SIGHUP $MAINPID
|
||
|
PIDFile=/var/run/pgbouncer/pgbouncer.pid
|
||
|
Restart=on-failure
|
||
|
|
||
|
LimitNOFILE=100000
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|