mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-26 11:48:58 +02:00
Added install-mini-dlna.ps1
This commit is contained in:
parent
42fe21f747
commit
c023128895
30
scripts/install-mini-dlna.ps1
Executable file
30
scripts/install-mini-dlna.ps1
Executable file
@ -0,0 +1,30 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs MiniDLNA
|
||||
.DESCRIPTION
|
||||
This PowerShell script installs the MiniDLNA server.
|
||||
.EXAMPLE
|
||||
PS> ./install-mini-dlna.ps1
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
if (-not($IsLinux)) { throw "Sorry, only Linux installation currently supported" }
|
||||
|
||||
"⏳ (1/4) Installing MiniDLNA from Snap Store..."
|
||||
& sudo snap install minidlna-jdstrand
|
||||
|
||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
"✅ MiniDLNA installed in $($elapsed)s."
|
||||
" Configuration: /var/snap/minidlna-jdstrand/current/minidlna.conf"
|
||||
" Log file: /var/snap/minidlna-jdstrand/current/home/minidlna.log"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"Sorry: $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user