PowerShell/scripts/install-octoprint.ps1

14 lines
417 B
PowerShell
Raw Normal View History

2024-10-01 15:11:03 +02:00

2023-08-16 19:44:24 +02:00
try {
2023-08-16 21:54:00 +02:00
"⏳ Installing OctoPrint (snap 'octoprint-pfs', channel 'edge')..."
2023-08-16 19:44:24 +02:00
2023-08-16 21:54:00 +02:00
& sudo snap install octoprint-pfs --edge
if ($lastExitCode -ne "0") { throw "'snap install octoprint-pfs' exited with code $lastExitCode" }
2023-08-16 19:44:24 +02:00
2023-08-16 21:31:15 +02:00
"HINT: Access Octoprint's web login at: http://<HOSTNAME>:5000"
2023-08-16 19:44:24 +02:00
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}