environment/lib/data/templates/postgres/postgres.service.erb

37 lines
535 B
Text
Raw Normal View History

2025-08-07 13:02:01 +02:00
[Unit]
2025-08-07 16:29:11 +02:00
Description=PostgreSQL <%= version %>
2025-08-07 13:02:01 +02:00
After=network.target
[Service]
2025-08-08 10:17:01 +02:00
Type=notify
#Type=simple
2025-08-07 13:02:01 +02:00
2025-08-08 10:17:01 +02:00
User=postgres
2025-08-07 21:05:37 +02:00
Group=services
ExecStart=<%= postgres_bin %> -D <%= database_dir %>
StandardOutput=journal
StandardError=journal
2025-08-07 13:02:01 +02:00
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
TimeoutSec=300
Restart=on-failure
NotifyAccess=all
# Security
2025-08-07 21:05:37 +02:00
#ProtectSystem=full
#ProtectHome=true
2025-08-08 10:17:01 +02:00
ReadWritePaths=<%= database_dir %>
2025-08-07 21:05:37 +02:00
2025-08-08 10:17:01 +02:00
# PrivateTmp=true
2025-08-07 13:02:01 +02:00
NoNewPrivileges=true
# Resource Limits
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target