Skip to content

Instantly share code, notes, and snippets.

@666threesixes666 666threesixes666/puma
Last active Aug 29, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.