Last active
June 13, 2017 00:33
-
-
Save jmervine/41a24198dcfd2ccd322c9ffe3a3e7228 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fake_rand = `hostname`.hash % 6 | |
if config["STUNNEL_AUTORESTART"] | |
cron "stunnel-restart cron job" do | |
command "/sbin/restart stunnel-mod-gearman-worker-ssl" | |
minute [0, 15, 30, 45].map { |i| fake_rand + i }.join(", ") | |
mailto "srtools@heroku.com" | |
user "root" | |
action :create | |
end | |
else | |
cron "stunnel-restart cron job" do | |
command "/sbin/restart stunnel-mod-gearman-worker-ssl" | |
minute [0, 15, 30, 45].map { |i| fake_rand + i }.join(", ") | |
mailto "srtools@heroku.com" | |
user "root" | |
action :delete | |
end | |
end | |
# or not | |
if config["STUNNEL_AUTORESTART"] | |
cron "stunnel-restart cron job" do | |
command "/sbin/restart stunnel-mod-gearman-worker-ssl" | |
minute "*/15" | |
mailto "srtools@heroku.com" | |
user "root" | |
action :create | |
end | |
else | |
cron "stunnel-restart cron job" do | |
command "/sbin/restart stunnel-mod-gearman-worker-ssl" | |
minute "*/15" | |
mailto "srtools@heroku.com" | |
user "root" | |
action :delete | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment