diff --git a/LetsEncrypt.SiteExtension.WebJob/Functions.cs b/LetsEncrypt.SiteExtension.WebJob/Functions.cs index 38a4315..8d18172 100644 --- a/LetsEncrypt.SiteExtension.WebJob/Functions.cs +++ b/LetsEncrypt.SiteExtension.WebJob/Functions.cs @@ -33,13 +33,19 @@ public override DateTime GetNextOccurrence(DateTime now) } public class Functions - { - - - public static void SetupHostNameAndCertificate([TimerTrigger(typeof(MonthlySchedule), RunOnStartup = true)] TimerInfo timerInfo) + { + public static void SetupHostNameAndCertificate([TimerTrigger(typeof(MonthlySchedule), RunOnStartup = true)] TimerInfo timerInfo, [Blob("letsencrypt/firstrun.job")] string input, [Blob("letsencrypt/firstrun.job")] out string output) { Console.WriteLine("Starting setup hostname and certificate"); - new CertificateManager().SetupHostnameAndCertificate(); + if (string.IsNullOrEmpty(input)) + { + new CertificateManager().SetupHostnameAndCertificate(); + output = DateTime.UtcNow.ToString(); + } + else + { + output = input; + } Console.WriteLine("Completed setup hostname and certificate"); } diff --git a/LetsEncrypt.nuspec b/LetsEncrypt.nuspec index f1f5bec..70b71d7 100644 --- a/LetsEncrypt.nuspec +++ b/LetsEncrypt.nuspec @@ -3,7 +3,7 @@ letsencrypt Azure Let's Encrypt (x86) - 0.4.5 + 0.4.7 SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension diff --git a/LetsEncrypt64.nuspec b/LetsEncrypt64.nuspec index 7a57543..ca7c84c 100644 --- a/LetsEncrypt64.nuspec +++ b/LetsEncrypt64.nuspec @@ -3,7 +3,7 @@ letsencrypt64 Azure Let's Encrypt (x64) - 0.4.5 + 0.4.7 SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension diff --git a/letsencrypt.siteextension.job.nuspec b/letsencrypt.siteextension.job.nuspec index 80f8842..5290153 100644 --- a/letsencrypt.siteextension.job.nuspec +++ b/letsencrypt.siteextension.job.nuspec @@ -3,7 +3,7 @@ letsencrypt.siteextension.job Azure SiteExtension Let's Encrypt WebJob - 0.4.5-beta + 0.4.7-beta SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension diff --git a/letsencrypt.siteextension.job64.nuspec b/letsencrypt.siteextension.job64.nuspec index 17bb59d..3e51760 100644 --- a/letsencrypt.siteextension.job64.nuspec +++ b/letsencrypt.siteextension.job64.nuspec @@ -3,7 +3,7 @@ letsencrypt.siteextension.job64 Azure SiteExtension Let's Encrypt WebJob (64bit) - 0.4.5-beta + 0.4.7-beta SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension