На примере pgbouncer:
/usr/lib/systemd/system/pgbouncer-rw.service
[Unit]
Description=pgbouncer-rw
After=network.target remote-fs.target nss-lookup.target
[Service]
LimitNOFILE=100000
Type=forking
PIDFile=/var/run/pgbouncer/pgbouncer-rw.pid
ExecStart=/bin/pgbouncer -d /etc/pgbouncer/pgbouncer-rw.ini
ExecStop=/bin/kill -s HUP $MAINPID
ExecReload=/bin/kill -s 1 $MAINPID
Signal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
/usr/lib/systemd/system/pgbouncer-rw.service
[Unit]
Description=pgbouncer-rw
After=network.target remote-fs.target nss-lookup.target
[Service]
LimitNOFILE=100000
Type=forking
PIDFile=/var/run/pgbouncer/pgbouncer-rw.pid
ExecStart=/bin/pgbouncer -d /etc/pgbouncer/pgbouncer-rw.ini
ExecStop=/bin/kill -s HUP $MAINPID
ExecReload=/bin/kill -s 1 $MAINPID
Signal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl enable pgbouncer-rw
service start/stop/reload/restart pgbouncer-rw
Комментариев нет:
Отправить комментарий