Use variable to enable readonly mode, as was used in the previous version of the...
authorMatt Amos <zerebubuth@gmail.com>
Mon, 20 Jun 2016 18:36:37 +0000 (19:36 +0100)
committerMatt Amos <zerebubuth@gmail.com>
Mon, 3 Oct 2016 12:46:36 +0000 (13:46 +0100)
cookbooks/web/templates/default/cgimap.init.erb

index 888e10cff321d1d29cd23163698fa68cb3488d14..9048f1fd74c1bb3622d1997b994bf57ac07f1ccf 100644 (file)
@@ -13,7 +13,7 @@ CGIMAP_RATELIMIT=204800; export CGIMAP_RATELIMIT
 CGIMAP_MAXDEBT=250; export CGIMAP_MAXDEBT
 
 start() {
-  start-stop-daemon --start --chuid rails --exec /usr/bin/openstreetmap-cgimap -- --daemon --port=8000 --instances=30 --pidfile $CGIMAP_PIDFILE
+  start-stop-daemon --start --chuid rails --exec /usr/bin/openstreetmap-cgimap --pidfile $CGIMAP_PIDFILE -- --daemon <% if @database_readonly %>--readonly<% end %> --port=8000 --instances=30
 }
 
 stop() {