Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
/etc/init.d/thin
#!/bin/sh
# This is a pretty bad, but effective workaround for starting thin as a service per application.
DAEMON=/usr/local/lib/ruby/gems/1.9.1/bin/thin
# DAEMON=/usr/local/bin/bundler thin
SCRIPT_NAME=/etc/init.d/thin
CONFIG_PATH=/etc/thin
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
case "$1" in
start)
cd /srv/hub/current && bundle exec thin start -d -C /etc/thin/hub.yml
;;
stop)
cd /srv/hub/current && bundle exec thin stop -d -C /etc/thin/hub.yml
;;
restart)
cd /srv/hub/current && bundle exec thin restart -d -C /etc/thin/hub.yml
;;
*)
echo "Usage: $SCRIPT_NAME {start|stop|restart}" >&2
exit 3
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.