mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 17:38:19 +02:00
Update install-evcc.ps1
This commit is contained in:
parent
91e99a66b5
commit
5f8bdab7fd
@ -14,24 +14,27 @@
|
|||||||
try {
|
try {
|
||||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||||
|
|
||||||
"⏳ (1/6) Installing necessary packets..."
|
if ($IsLinux) {
|
||||||
& sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
"⏳ (1/6) Installing necessary packets..."
|
||||||
|
& sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
||||||
|
|
||||||
"⏳ (2/6) Installing keyring for evcc..."
|
"⏳ (2/6) Installing keyring for evcc..."
|
||||||
& curl -1sLf 'https://dl.cloudsmith.io/public/evcc/stable/setup.deb.sh' | sudo -E bash
|
& curl -1sLf 'https://dl.cloudsmith.io/public/evcc/stable/setup.deb.sh' | sudo -E bash
|
||||||
|
|
||||||
"⏳ (3/6) Updating packet list...."
|
"⏳ (3/6) Updating packet list...."
|
||||||
& sudo apt update
|
& sudo apt update
|
||||||
|
|
||||||
"⏳ (4/6) Installing evcc packet..."
|
"⏳ (4/6) Installing evcc packet..."
|
||||||
& sudo apt install -y evcc
|
& sudo apt install -y evcc
|
||||||
|
|
||||||
"⏳ (5/6) Configuring evcc..."
|
"⏳ (5/6) Configuring evcc..."
|
||||||
& evcc configure
|
& evcc configure
|
||||||
|
|
||||||
"⏳ (6/6) Starting evcc Web server on :7070 as system service..."
|
|
||||||
& sudo systemctl start evcc
|
|
||||||
|
|
||||||
|
"⏳ (6/6) Starting evcc Web server on :7070 as system service..."
|
||||||
|
& sudo systemctl start evcc
|
||||||
|
} else {
|
||||||
|
throw "Sorry, only Linux installation currently supported"
|
||||||
|
}
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ evcc installed successfully in $Elapsed sec"
|
"✔️ evcc installed successfully in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
Loading…
Reference in New Issue
Block a user