more settings of systemd for postgress

This commit is contained in:
Artur Gurgul1 2025-08-07 21:05:37 +02:00
parent 688d23527f
commit dd1c82e804
5 changed files with 35 additions and 19 deletions

View file

@ -3,12 +3,17 @@ Description=PostgreSQL <%= version %>
After=network.target
[Service]
Type=notify
# Type=notify
Type=simple
User=postgresql
Group=servicesql
Group=services
ExecStart=<%= postgres_bin %> -D <%= database_dir %>
StandardOutput=journal
StandardError=journal
ExecStart=<%= postgres_bin %> -D <%= database_dir %>/data
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
TimeoutSec=300
@ -16,8 +21,10 @@ Restart=on-failure
NotifyAccess=all
# Security
ProtectSystem=full
ProtectHome=true
#ProtectSystem=full
#ProtectHome=true
#ReadWritePaths=<%= database_dir %>
PrivateTmp=true
NoNewPrivileges=true