示例#1
0
文件: Program.cs 项目: papci/DebWeb
 private static void SetupSsl(EnvSettings.SystemSettings systemSettings, EnvSettings.AppSettings appSettings)
 {
     if (appSettings.UseLetsencrypt)
     {
         Console.WriteLine("Generating SSL certificate ...");
         LetsencryptGenerator.GenerateCert(systemSettings, appSettings);
         Console.WriteLine("Reconfiguring Nginx ...");
         NginxTemplate nginxTemplate = new NginxTemplate(systemSettings, appSettings, true);
         nginxTemplate.WriteFileAsync();
         Console.WriteLine("Reloading Nginx ...");
         "service nginx reload".Bash();
         Console.WriteLine("SSL setup done !");
     }
     else
     {
         Console.WriteLine("This project does not use SSL.");
     }
 }