Skip to content

Instantly share code, notes, and snippets.

@mrrooijen
Created July 1, 2011 21:42
Show Gist options
  • Save mrrooijen/1059459 to your computer and use it in GitHub Desktop.
Save mrrooijen/1059459 to your computer and use it in GitHub Desktop.
Upstart PostgreSQL
start on runlevel [2345]
stop on runlevel [016]
respawn
script
exec su -c "/etc/postgresql/bin/postgres -D /usr/local/pgsql/data" postgres
end script
# note
# change the path ( /etc/postgresql/bin/postgres ) to the directory
# you installed postgresql if it different from this directory.
@bradleyayers
Copy link

Why are you using the script stanza here? Just use exec.

@mrrooijen
Copy link
Author

Thanks for pointing that out. Didn't know you could omit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment