Commit 16fce56

mo khan <mo@mokhan.ca>
2015-11-28 15:10:25
update runit scripts to run using bash.
1 parent 43501e7
templates/sv-foreman-run.erb
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 exec 2>&1
 source /etc/profile.d/rbenv.sh
 envdir=$(pwd)/env
+user=<%= node['stronglifters']['username'] %>
 cd <%= node['stronglifters']['root_path'] %>/current
-exec chpst -u <%= node['stronglifters']['username'] %> \
-  -e $envdir /usr/local/rbenv/shims/foreman start
+exec chpst -u $user -e $envdir foreman start
templates/sv-puma-run.erb
@@ -1,6 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 exec 2>&1
 source /etc/profile.d/rbenv.sh
 envdir=$(pwd)/env
+user=<%= node['stronglifters']['username'] %>
 cd <%= node['stronglifters']['root_path'] %>/current
-exec chpst -u <%= node['stronglifters']['username'] %> -e $envdir /usr/local/rbenv/shims/bundle exec puma -C config/puma_production.rb
+exec chpst -u $user -e $envdir bundle exec puma -C config/puma_production.rb
templates/sv-sidekiq-run.erb
@@ -1,6 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 exec 2>&1
 source /etc/profile.d/rbenv.sh
 envdir=$(pwd)/env
+user=<%= node['stronglifters']['username'] %>
 cd <%= node['stronglifters']['root_path'] %>/current
-exec chpst -u <%= node['stronglifters']['username'] %> -e $envdir /usr/local/rbenv/shims/bundle exec sidekiq
+exec chpst -u $user -e $envdir bundle exec sidekiq