Skip to content

Commit c023128

Browse files
committed
Added install-mini-dlna.ps1
1 parent 42fe21f commit c023128

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

scripts/install-mini-dlna.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<#
2+
.SYNOPSIS
3+
Installs MiniDLNA
4+
.DESCRIPTION
5+
This PowerShell script installs the MiniDLNA server.
6+
.EXAMPLE
7+
PS> ./install-mini-dlna.ps1
8+
.LINK
9+
https://github.com/fleschutz/PowerShell
10+
.NOTES
11+
Author: Markus Fleschutz | License: CC0
12+
#>
13+
14+
try {
15+
$stopWatch = [system.diagnostics.stopwatch]::startNew()
16+
17+
if (-not($IsLinux)) { throw "Sorry, only Linux installation currently supported" }
18+
19+
"⏳ (1/4) Installing MiniDLNA from Snap Store..."
20+
& sudo snap install minidlna-jdstrand
21+
22+
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
23+
"✅ MiniDLNA installed in $($elapsed)s."
24+
" Configuration: /var/snap/minidlna-jdstrand/current/minidlna.conf"
25+
" Log file: /var/snap/minidlna-jdstrand/current/home/minidlna.log"
26+
exit 0 # success
27+
} catch {
28+
"Sorry: $($Error[0])"
29+
exit 1
30+
}

0 commit comments

Comments
 (0)