1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/tools/jungle/init.d/run-puma
Manabu Ejima efc2620c62 Fix the order of redirects (#1511)
Redirect from stderr to stdout should be before redirect to a log file
2018-03-19 15:46:55 -06:00

18 lines
618 B
Bash
Executable file

#!/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 -)"
elif [ -f /usr/local/rvm/scripts/rvm ]; then
source /etc/profile.d/rvm.sh
elif [ -f "$HOME/.rvm/scripts/rvm" ]; then
source "$HOME/.rvm/scripts/rvm"
fi
app=$1; config=$2; log=$3;
cd $app && exec bundle exec puma -C $config >> $log 2>&1