mirror of
https://gitea.0xace.cc/ansible-galaxy/pgbouncer.git
synced 2024-11-24 20:56:40 +00:00
28 lines
739 B
Django/Jinja
28 lines
739 B
Django/Jinja
[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
|