Skip to content

Instantly share code, notes, and snippets.

@babie
Created November 4, 2013 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save babie/7297788 to your computer and use it in GitHub Desktop.
Save babie/7297788 to your computer and use it in GitHub Desktop.
description "earthquake server"
author "babie wildheart <babie@example.com>"
# start,stopは正常に動くがsocat&reptyrで繋いだ時、文字入力に不具合がある
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
setuid babie
setgid babie
umask 022
console output
script
export HOME=/home/babie
export LANG=ja_JP.UTF-8
export PATH=/home/babie/.rbenv/shims:/home/babie/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
exec earthquake
end script
post-start script
pid=`status earthquake | grep -Eo '([0-9]+)$' | head -n 1`
echo $pid > /tmp/earthquake.pid
end script
post-stop script
rm -f /tmp/earthquake.pid
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment