aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Land <caleb@land.fm>2014-04-22 16:14:52 -0400
committerCaleb Land <caleb@land.fm>2014-04-22 16:14:52 -0400
commitb104ffaea9dcee1f71dab20506d3e01f0c90f3ba (patch)
tree6a8e7a2a05f868fee7471458c444aeda52e05524
parent497f0a1f0b5c37eb3f376da36f88ac6fe58e069b (diff)
parent7d96757d2ea14e3216873ccdb52b618d319d3607 (diff)
downloadfreebsd-puma-b104ffaea9dcee1f71dab20506d3e01f0c90f3ba.tar.gz
freebsd-puma-b104ffaea9dcee1f71dab20506d3e01f0c90f3ba.tar.bz2
freebsd-puma-b104ffaea9dcee1f71dab20506d3e01f0c90f3ba.zip
Merge pull request #2 from dejanstrbac/master
FreeBSD 10, Rails 4 and Capistrano 3
-rwxr-xr-xunicorn17
1 files changed, 10 insertions, 7 deletions
diff --git a/unicorn b/unicorn
index 604200c..57aa955 100755
--- a/unicorn
+++ b/unicorn
@@ -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}"
+