Skip to content

Instantly share code, notes, and snippets.

@666threesixes666
Last active August 29, 2015 14:05
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 666threesixes666/d8bca7f67439763d3e94 to your computer and use it in GitHub Desktop.
Save 666threesixes666/d8bca7f67439763d3e94 to your computer and use it in GitHub Desktop.
funtoo/gentoo puma init file
#!/sbin/runscript
# puma init script for Funtoo/Gentoo Linux
RAILS_BASE=$HOME(changeme)/testproject
RAILS_USER=youruserhostingtheapp
RAILS_ENVIRONMENT=development
depend() {
need net
}
start() {
ebegin "Starting puma server"
start-stop-daemon --start \
--chdir "${RAILS_BASE}" \
--user "${RAILS_USER}" \
--background \
--pidfile "${RAILS_BASE}/tmp/puma.pid" \
--make-pidfile \
--exec bundle -- exec puma -e "${RAILS_ENVIRONMENT}"
eend $?
}
stop() {
ebegin "Stopping puma server"
start-stop-daemon --stop \
--chdir "${RAILS_BASE}" \
--user "${RAILS_USER}" \
--pidfile "${RAILS_BASE}/tmp/puma.pid"
eend $?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment