Skip to content

Commit

Permalink
fix Bug 66211 - Fix issue with SSL renew (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrullonurullaev authored Apr 15, 2024
1 parent 4923756 commit cf9a4af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install/win/sbin/docspace-ssl-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ if ( $args.Count -ge 2 )

$day = (Get-Date -Format "dddd").ToUpper().SubString(0, 3)
$time = Get-Date -Format "HH:mm"
cmd.exe /c "SCHTASKS /F /CREATE /SC WEEKLY /D $day /TN `"Certbot renew`" /TR `"${app}\letsencrypt\letsencrypt_cron.bat`" /ST $time"
$taskName = "Certbot renew"
$action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "/c `"${app}\letsencrypt\letsencrypt_cron.bat`""
$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek $day -At $time

Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -Force
}

elseif ($args[0] -eq "-d" -or $args[0] -eq "--default") {
Expand Down

0 comments on commit cf9a4af

Please sign in to comment.