Update systemd service and add EnvironmentFile
This commit is contained in:
parent
46489b2f85
commit
4b7cc065d2
5 changed files with 50 additions and 28 deletions
|
@ -2,8 +2,24 @@
|
|||
Description=Prometheus exporter for PostgreSQL
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/prometheus_postgresql_exporter
|
||||
EnvironmentFile=-/etc/conf.d/prometheus-postgresql-exporter
|
||||
ExecStart=/usr/bin/prometheus_postgresql_exporter $POSTGRES_EXPORTER_ARGS
|
||||
Restart=on-failure
|
||||
|
||||
DynamicUser=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
LockPersonality=true
|
||||
ProtectHostname=true
|
||||
ProtectHome=true
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectKernelLogs=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
RestrictRealtime=true
|
||||
CapabilityBoundingSet=
|
||||
MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue