mirror of
https://abf.rosa.ru/djam/postgrespro-1c.git
synced 2025-02-23 21:42:47 +00:00
49 lines
1.6 KiB
SYSTEMD
49 lines
1.6 KiB
SYSTEMD
# It's not recommended to modify this file in-place, because it will be
|
|
# overwritten during package upgrades. If you want to customize, the
|
|
# best way is to create a file "/etc/systemd/system/postgrespro-10.service",
|
|
# containing
|
|
# .include /lib/systemd/system/postgrespro-10.service
|
|
# ...make your changes here...
|
|
# For more info about custom unit files, see
|
|
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
|
|
|
# Note: changing PGDATA will typically require adjusting SELinux
|
|
# configuration as well.
|
|
|
|
# Note: do not use a PGDATA pathname containing spaces, or you will
|
|
# break pg-setup.
|
|
[Unit]
|
|
Description=Postgres Pro @EDITION@ @VERSION@ database server
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
|
|
User=postgres
|
|
Group=postgres
|
|
|
|
OOMScoreAdjust=-1000
|
|
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
|
|
Environment=PG_OOM_ADJUST_VALUE=0
|
|
Environment=PATH=@BINDIR@:/usr/sbin:/usr/bin:/bin:/sbin
|
|
# Location of database directory
|
|
EnvironmentFile=/etc/default/postgrespro-@EDITION@-@VERSION@
|
|
|
|
# Where to send early-startup messages from the server (before the logging
|
|
# options of postgresql.conf take effect)
|
|
# This is normally controlled by the global default set by systemd
|
|
# StandardOutput=syslog
|
|
|
|
# Disable OOM kill on the postmaster
|
|
ExecStartPre=@BINDIR@/check-db-dir ${PGDATA}
|
|
ExecStart=@BINDIR@/postgres -D ${PGDATA}
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=mixed
|
|
KillSignal=SIGINT
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=300
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|