generate systemd for postgres
This commit is contained in:
parent
ed7fc9aa7f
commit
29a9b08573
4 changed files with 63 additions and 24 deletions
29
lib/data/templates/postgresql/postgresql.service.erb
Normal file
29
lib/data/templates/postgresql/postgresql.service.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
[Unit]
|
||||
Description=PostgreSQL <%= version %> database server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
|
||||
User=postgres
|
||||
Group=services
|
||||
|
||||
ExecStart=<%= postgres_bin %> -D <%= database_dir %>/data
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=mixed
|
||||
TimeoutSec=300
|
||||
Restart=on-failure
|
||||
NotifyAccess=all
|
||||
|
||||
# Security
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
NoNewPrivileges=true
|
||||
|
||||
# Resource Limits
|
||||
LimitNOFILE=65536
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue