Last active
October 30, 2017 06:16
-
-
Save mche/3824b42cd65d2686d74dbaf68a0c753f to your computer and use it in GitHub Desktop.
Debian systemd init postgresql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/uniost-postgresql.service | |
[Unit] | |
Description=PostgreSQL uniost user | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/home/uniost/postgresql/data/postmaster.pid | |
WorkingDirectory=/home/uniost/postgresql/data | |
User=uniost | |
Group=uniost | |
Environment=PGROOT=/home/uniost/postgresql/data | |
#OOMScoreAdjust=-200 | |
ExecStart=/home/uniost/postgresql/bin/pg_ctl start -D ${PGROOT} -l ${PGROOT}/logfile | |
ExecStop=/home/uniost/postgresql/bin/pg_ctl stop -D ${PGROOT} -l ${PGROOT}/logfile -m fast | |
ExecReload=/home/uniost/postgresql/bin/pg_ctl reload -D ${PGROOT} -l ${PGROOT}/logfile | |
TimeoutSec=120 | |
#Restart=always | |
#RemainAfterExit=on | |
[Install] | |
WantedBy=multi-user.target | |
#Alias=uniost-postgresql.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment