mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
cron: Set environment variables to use Smokescreen, if configured.
This commit is contained in:
committed by
Tim Abbott
parent
f355a08111
commit
572fafd6b9
@@ -24,8 +24,9 @@ class kandra::prod_app_frontend_once {
|
||||
command => '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://$(/home/zulip/deployments/current/scripts/get-django-setting NAGIOS_BOT_HOST) >/dev/null',
|
||||
}
|
||||
zulip::cron { 'check_user_zephyr_mirror_liveness':
|
||||
hour => '*',
|
||||
minute => '*',
|
||||
command => '/usr/lib/nagios/plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness >/dev/null',
|
||||
hour => '*',
|
||||
minute => '*',
|
||||
command => '/usr/lib/nagios/plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness >/dev/null',
|
||||
use_proxy => false,
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,20 @@ define zulip::cron(
|
||||
String $user = 'zulip',
|
||||
Optional[String] $command = undef,
|
||||
Optional[String] $manage = undef,
|
||||
Boolean $use_proxy = true,
|
||||
) {
|
||||
if $use_proxy {
|
||||
$proxy_host = zulipconf('http_proxy', 'host', 'localhost')
|
||||
$proxy_port = zulipconf('http_proxy', 'port', '4750')
|
||||
if $proxy_host != '' and $proxy_port != '' {
|
||||
$proxy = "http://${proxy_host}:${proxy_port}"
|
||||
} else {
|
||||
$proxy = ''
|
||||
}
|
||||
} else {
|
||||
$pxoy = ''
|
||||
}
|
||||
|
||||
$dsn = zulipconf('sentry', 'project_dsn', '')
|
||||
if $dsn != '' {
|
||||
include zulip::sentry_cli
|
||||
|
@@ -2,9 +2,13 @@ MAILTO=zulip
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
USER=<%= @user %>
|
||||
<% if @dsn != '' %>
|
||||
<% if @proxy != '' -%>
|
||||
HTTP_proxy="<%= @proxy %>"
|
||||
HTTPS_proxy="<%= @proxy %>"
|
||||
<% end -%>
|
||||
<% if @dsn != '' -%>
|
||||
SENTRY_DSN=<%= @dsn %>
|
||||
<% end %>
|
||||
<% end -%>
|
||||
|
||||
<%= @minute %> <%= @hour %> * * <%= @dow %> <%= @user %> <%= @run %>
|
||||
|
||||
|
Reference in New Issue
Block a user