aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-06-23 11:26:40 +0100
committerLouise Crow <louise.crow@gmail.com>2015-06-23 11:26:40 +0100
commitcafc4250a4f2f4f41250da9d9c626d2e1528978c (patch)
treede6b21b4ed4992f4e48d0a6d4ee6b9a1d7424dd5 /lib
parent81aeff8a2302b2e39eddae4ccab47c96d3ea4ff1 (diff)
parentdec7502393e8cf30ecf700965b3cf97824b1eae1 (diff)
Merge branch 'add-rbenv-shims' into develop
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/config_files.rake16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake
index f6b25185e..d0dc8f594 100644
--- a/lib/tasks/config_files.rake
+++ b/lib/tasks/config_files.rake
@@ -21,6 +21,22 @@ namespace :config_files do
converted_lines
end
+ desc 'Convert wrapper example in config to a form suitable for running mail handling scripts with rbenv'
+ task :convert_wrapper => :environment do
+ example = 'rake config_files:convert_wrapper DEPLOY_USER=deploy SCRIPT_FILE=config/run-with-rbenv-path.example'
+ check_for_env_vars(['DEPLOY_USER',
+ 'SCRIPT_FILE'], example)
+
+ replacements = {
+ :user => ENV['DEPLOY_USER'],
+ }
+
+ # Generate the template for potential further processing
+ convert_ugly(ENV['SCRIPT_FILE'], replacements).each do |line|
+ puts line
+ end
+ end
+
desc 'Convert Debian example init script in config to a form suitable for installing in /etc/init.d'
task :convert_init_script => :environment do
example = 'rake config_files:convert_init_script DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli SCRIPT_FILE=config/alert-tracks-debian.example'