alistairphillips.com

I’m : a web and mobile developer based in the Australia.


Upstart for Tiny Tiny RSS

Since Google Reader left town I've been using an installation of Tiny Tiny RSS and rather than firing the update script via cron I'm using the following Upstart script for Ubuntu.

description "Tiny Tiny RSS Feed Updater"
author "Alistair Phillips alistair@alistairphillips.com"

    # We're using PostgreSQL http://paulwhippconsulting.com/blog/upstart-jobs-that-depend-upon-non-upstart-jobs/
    start on runlevel [2345]
    stop on runlevel [!2345]

    respawn
    respawn limit 10 5
    setuid www
    setgid www

    script
        chdir /var/www/path/to/tt-rss
        exec /usr/bin/php ./update_daemon2.php
    end script