Skip to content

Instantly share code, notes, and snippets.

@HeinrichHartmann
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HeinrichHartmann/9021280 to your computer and use it in GitHub Desktop.
Save HeinrichHartmann/9021280 to your computer and use it in GitHub Desktop.
Postgres Upstart Script
# postgres.conf
#
# A simple upstart script for the postgresql server as installed from source
# http://www.postgresql.org/docs/9.3/interactive/installation.html
#
# Place this file in /etc/init/
#
# Usage:
# $ sudo service postgres start|stop|status
#
description "PostgreSQL server"
# Start on startup
start on runlevel [2345]
# Log tp /var/log/upstart/postgres.log
console log
# change user
setuid postgres
# change dir
chdir /data/psql
# command to exec
exec /usr/local/pgsql/bin/postgres -D /data/psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment