Sunday, October 16, 2011

Upstart job for PostgreSQL 9.1 on Ubuntu 11.10

In line with the recent Upstart theme, he's a script for PostgreSQL 9.1 on Ubuntu 11.10:

Save this to /etc/init/postgresql.conf and delete the symlinks from /etc/rc#.d/ to disable the SysV scripts.

5 comments:

  1. You read my mind! Thanks for posting this.

    ReplyDelete
  2. Nice, I was looking for this. Only it does not stops postgres properly.

    ReplyDelete
  3. Hi,

    This scripts doesn't work properly and it might even be dangerous to your db(it's doing hard shutdown every time)

    this one seems to works much better

    https://gist.github.com/haad/6020401

    ReplyDelete
  4. only the exec statement is commented out.

    ReplyDelete
    Replies
    1. that one does not actually use the exec statement at all, it starts and stops in the pre and post tasks inside the looks. HOWEVER, it does not appear to work well around restarting a service that has died.

      Delete