Skip to content

Instantly share code, notes, and snippets.

@usualoma
Created August 22, 2012 04:44
Show Gist options
  • Save usualoma/3422333 to your computer and use it in GitHub Desktop.
Save usualoma/3422333 to your computer and use it in GitHub Desktop.
movable type config file for upstart
description "Movable Type"
start on runlevel [2345] or mysql
stop on runlevel [!2345]
respawn
respawn limit 2 5
env PLACK_ENV=deployment
env MT_HOME=/home/movabletype/public_html/movabletype
env MT_CONFIG=/home/movabletype/public_html/movabletype/mt-config.cgi
script
port="5000"
user="movabletype"
group="movabletype"
pidfile=`perl -ne 'next if /^#/; print $1 if /^\s*PIDFilePath\s+(.*)/i' ${MT_CONFIG}`
exec /usr/bin/starman --user $user --group $user --pid $pidfile ${MT_HOME}/mt.psgi -p $port
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment