add unix socket for postgres

This commit is contained in:
Artur Gurgul1 2025-08-08 10:17:01 +02:00
parent 2054a68af0
commit 2289379ad5
9 changed files with 32 additions and 29 deletions

View file

@ -0,0 +1,36 @@
[Unit]
Description=PostgreSQL <%= version %>
After=network.target
[Service]
Type=notify
#Type=simple
User=postgres
Group=services
ExecStart=<%= postgres_bin %> -D <%= database_dir %>
StandardOutput=journal
StandardError=journal
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
TimeoutSec=300
Restart=on-failure
NotifyAccess=all
# Security
#ProtectSystem=full
#ProtectHome=true
ReadWritePaths=<%= database_dir %>
# PrivateTmp=true
NoNewPrivileges=true
# Resource Limits
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target