Crash if SMTP is not configured
authorSam <sam.saffron@gmail.com>
Mon, 25 Aug 2014 06:55:38 +0000 (16:55 +1000)
committerSam <sam.saffron@gmail.com>
Mon, 25 Aug 2014 06:55:38 +0000 (16:55 +1000)
templates/web.template.yml

index db753b8c974f04e0e39633b1604cf9d895d043e8..b31ef3d53b936e339d877e56d8aa793fad02cc12 100644 (file)
@@ -21,6 +21,7 @@ params:
   upload_size: 3m
 
 run:
+  - exec: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
   - file:
      path: /etc/runit/1.d/copy-env
      chmod: "+x"