run:
- exec: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
+ - exec: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
- file:
path: /etc/runit/1.d/copy-env
chmod: "+x"
/usr/local/bin/ruby -e 'ENV.each{|k,v| puts "#{$1.downcase} = #{v}" if k =~ /^DISCOURSE_(.*)/}' > $conf
- file:
- path: /etc/runit/1.d/ensure-web-nginx-read
- chmod: "+x"
- contents: |
+ path: /etc/runit/1.d/ensure-web-nginx-read
+ chmod: "+x"
+ contents: |
#!/bin/bash
+ mkdir -p /var/log/nginx
chgrp -R www-data /var/log/nginx
chgrp www-data /var/log/nginx
+
- file:
path: /etc/service/unicorn/run
chmod: "+x"
contents: |
#!/bin/sh
exec 2>&1
- mkdir -p /var/log/nginx
exec /usr/sbin/nginx
- file:
mkdir -p /shared/backups
chown -R discourse:www-data /shared/backups
fi
+
+ # change login directory to Discourse home
+ - file:
+ path: /root/.bash_profile
+ chmod: 644
+ contents: |
+ cd $home