add unix socket for postgres
This commit is contained in:
parent
2054a68af0
commit
2289379ad5
9 changed files with 32 additions and 29 deletions
36
lib/data/templates/postgres/postgres.service.erb
Normal file
36
lib/data/templates/postgres/postgres.service.erb
Normal 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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue