-
-
Save 666threesixes666/d8bca7f67439763d3e94 to your computer and use it in GitHub Desktop.
funtoo/gentoo puma init file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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