Skip to content

Instantly share code, notes, and snippets.

@usualoma
Created August 22, 2012 04:48
Show Gist options
  • Save usualoma/3422348 to your computer and use it in GitHub Desktop.
Save usualoma/3422348 to your computer and use it in GitHub Desktop.
movable type config file for systemd
[Unit]
Description=Movable Type
After=syslog.target
After=network.target
After=mysqld.service
[Service]
User=movabletype
Group=movabletype
Restart=always
SyslogIdentifier=movabletype
Environment=PLACK_ENV=deployment
Environment=MT_HOME=/home/movabletype/public_html/movabletype
Environment=MT_CONFIG=${MT_HOME}/mt-config.cgi
ExecStart=/usr/bin/starman ${MT_HOME}/mt.psgi -p 5000
#ExecStart=/usr/bin/plackup -s Starlet ${MT_HOME}/mt.psgi -p 5000
ExecStartPost=/bin/sh -c "echo ${MAINPID} > `perl -ne 'next if /^#/; print $1 if /^\s*PIDFilePath\s+(.*)/i' ${MT_CONFIG}`"
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment