ChocolateyInstall.ps1 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $ErrorActionPreference = 'Stop'
  2. $packageName = 'sftpgo'
  3. $softwareName = 'SFTPGo'
  4. $url = 'https://github.com/drakkan/sftpgo/releases/download/v2.3.2/sftpgo_v2.3.2_windows_x86_64.exe'
  5. $checksum = '346BF3F1E32BC1AC6D15FA64986C44576FD2A300AB4A5E243C37F6CDC134090D'
  6. $silentArgs = '/VERYSILENT'
  7. $validExitCodes = @(0)
  8. $packageArgs = @{
  9. packageName = $packageName
  10. fileType = 'exe'
  11. file = $fileLocation
  12. url = $url
  13. checksum = $checksum
  14. checksumType = 'sha256'
  15. silentArgs = $silentArgs
  16. validExitCodes= $validExitCodes
  17. softwareName = $softwareName
  18. }
  19. Install-ChocolateyPackage @packageArgs
  20. $DefaultDataPath = Join-Path -Path $ENV:ProgramData -ChildPath "SFTPGo"
  21. $DefaultConfigurationFilePath = Join-Path -Path $DefaultDataPath -ChildPath "sftpgo.json"
  22. # `t = tab
  23. Write-Output "---------------------------"
  24. Write-Output ""
  25. Write-Output "If you have never used SFTPGo before, the web administration panel is located here:"
  26. Write-Output "`thttp://localhost:8080/web/admin"
  27. Write-Output ""
  28. Write-Output "Default web administration port:"
  29. Write-Output "`t8080"
  30. Write-Output "Default SFTP port:"
  31. Write-Output "`t2022"
  32. Write-Output ""
  33. Write-Output "Default data location:"
  34. Write-Output "`t$DefaultDataPath"
  35. Write-Output "Default configuration file location:"
  36. Write-Output "`t$DefaultConfigurationFilePath"
  37. Write-Output ""
  38. Write-Output "If the SFTPGo service does not start, make sure that TCP ports 2022 and 8080 are"
  39. Write-Output "not used by other services or change the SFTPGo configuration to suit your needs."
  40. Write-Output ""
  41. Write-Output "General information (README) location:"
  42. Write-Output "`thttps://github.com/drakkan/sftpgo"
  43. Write-Output "Getting start guide location:"
  44. Write-Output "`thttps://github.com/drakkan/sftpgo/blob/v2.3.2/docs/howto/getting-started.md"
  45. Write-Output "Detailed information (docs folder) location:"
  46. Write-Output "`thttps://github.com/drakkan/sftpgo/tree/v2.3.2/docs"
  47. Write-Output ""
  48. Write-Output "---------------------------"