Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Fix get_django_setting_slow during first puppet run.
Alex Vandiver8faeaf65e839
diff --git a/puppet/zulip/lib/puppet/functions/get_django_setting_slow.rb b/puppet/zulip/lib/puppet/functions/get_django_setting_slow.rbindex 953fba15d83..5c040132d52 100644--- a/puppet/zulip/lib/puppet/functions/get_django_setting_slow.rb+++ b/puppet/zulip/lib/puppet/functions/get_django_setting_slow.rb@@ -9,7 +9,13 @@ require "shellwords"Puppet::Functions.create_function(:get_django_setting_slow) dodef get_django_setting_slow(name)if File.exist?("/etc/zulip/settings.py")- output = `/home/zulip/deployments/current/scripts/get-django-setting #{name.shellescape} 2>&1`+ if Dir.exist?("/home/zulip/deployments/current")+ deploy_dir = "current"+ else+ # First puppet runs during install don't have a "current" yet, only a "next"+ deploy_dir = "next"+ end+ output = `/home/zulip/deployments/#{deploy_dir}/scripts/get-django-setting #{name.shellescape} 2>&1`if $?.success?output.stripelse