Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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