Created
June 29, 2016 18:21
-
-
Save svoboda-jan/873f41c5d58f8b87b49addec43135b74 to your computer and use it in GitHub Desktop.
Updated heler script for Puma init script for Debian 8.5
This file contains 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
#!/bin/bash | |
# on system boot, and root have no rbenv installed, | |
# after start-stop-daemon switched to current user, we have to init rbenv | |
if [ -d "$HOME/.rbenv/bin" ]; then | |
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" | |
eval "$(rbenv init -)" | |
elif [ -d "/usr/local/rbenv/bin" ]; then | |
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH" | |
eval "$(rbenv init -)" | |
fi | |
app=$1; config=$2; log=$3; | |
cd $app && exec bundle exec puma -C $config 2>&1 >> $log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment