mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-25 01:14:16 +01:00
900 B
900 B
Script: install-octoprint.ps1
install-octoprint.ps1
Parameters
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
Script Content
try {
"⏳ Installing OctoPrint (snap 'octoprint-pfs', channel 'edge')..."
& sudo snap install octoprint-pfs --edge
if ($lastExitCode -ne "0") { throw "'snap install octoprint-pfs' exited with code $lastExitCode" }
"HINT: Access Octoprint's web login at: http://<HOSTNAME>:5000"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 05/19/2024 10:25:20)