diff options
author | Dejan Strbac <me@dejanstrbac.com> | 2014-04-06 13:39:24 +0200 |
---|---|---|
committer | Dejan Strbac <me@dejanstrbac.com> | 2014-04-06 13:39:24 +0200 |
commit | 7d96757d2ea14e3216873ccdb52b618d319d3607 (patch) | |
tree | 6a8e7a2a05f868fee7471458c444aeda52e05524 /unicorn | |
parent | 497f0a1f0b5c37eb3f376da36f88ac6fe58e069b (diff) | |
download | freebsd-puma-7d96757d2ea14e3216873ccdb52b618d319d3607.tar.gz freebsd-puma-7d96757d2ea14e3216873ccdb52b618d319d3607.tar.bz2 freebsd-puma-7d96757d2ea14e3216873ccdb52b618d319d3607.zip |
- Rack based rails app supported by default
- FreeBSD 10 support without set_rcvar in rc.conf
- Capistrano 3 directory structure support (shared/tmp/pids)
Diffstat (limited to 'unicorn')
-rwxr-xr-x | unicorn | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -7,7 +7,7 @@ . /etc/rc.subr name="unicorn" -rcvar=`set_rcvar` +rcvar="${name}_enable" procname="ruby" extra_commands="upgrade show reopenlogs" @@ -50,11 +50,11 @@ _setup_directory() { local directory directory=$1 - - directory_command="${directory}/current/bin/unicorn_rails" - directory_pidfile="${directory}/shared/pids/unicorn.pid" + + directory_command="${directory}/current/bin/unicorn" + directory_pidfile="${directory}/shared/tmp/pids/unicorn.pid" directory_old_pidfile="${directory_pidfile}.oldbin" - directory_config="${directory}/current/config/unicorn.conf.rb" + directory_config="${directory}/current/config/unicorn.rb" directory_rackup="${directory}/current/config.ru" directory_init_config="${directory}/current/.env" directory_bundle_gemfile="${directory}/current/Gemfile" @@ -82,7 +82,9 @@ if [ -n "$2" ]; then profile="$2" # set the rcvar for this specific profile - rcvar=`set_rcvar "${name}_${profile}"` + rcvar="${name}_${profile}_enable" + rcvar="${rcvar}" + # if the user provides a directory, we can infer some default configuration directory=`_read_profile_var "${profile}" "directory"` @@ -110,7 +112,7 @@ else # If we weren't started with a profile, run the command on all available profiles for profile in ${unicorn_profiles}; do # By default set the profile rcvar to no to suppress warnings by checkyesno - profile_rcvar=`set_rcvar "${name}_${profile}"` + profile_rcvar="${name}_${profile}_enable" eval "${profile_rcvar}=\${${profile_rcvar}:-'NO'}" if checkyesno ${profile_rcvar}; then @@ -305,3 +307,4 @@ unicorn_reopenlogs_command() } run_rc_command "${1}" + |