diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-06-19 14:40:38 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-23 10:25:14 +0100 |
commit | dec7502393e8cf30ecf700965b3cf97824b1eae1 (patch) | |
tree | 42223c9a31bb5bce3cc109b4a3f020a51563685a | |
parent | 28f2036521d2bf8c3daafaa6f098214b410fa687 (diff) |
Add conversion task for config/run-with-rbenv-path.example
-rw-r--r-- | lib/tasks/config_files.rake | 16 |
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' |