Update ersatztv-install.sh

Finalize
This commit is contained in:
CanbiZ 2024-04-29 15:26:57 +02:00 committed by GitHub
parent da8942aaa3
commit 38be75aa53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,13 +29,10 @@ $STD apt-get install -y --no-install-recommends \
msg_ok "Installed Dependencies"
msg_info "Installing ErsatzTV (Patience)"
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }' | head -n 1)
wget -q https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz
tar -xf ErsatzTV-${RELEASE}-linux-x64.tar.gz
mv ErsatzTV-${RELEASE}-linux-x64 ErsatzTV
rm -R ErsatzTV-${RELEASE}-linux-x64.tar.gz
msg_info "Installing ErsatzTV "
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt
mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV
msg_ok "Installed ErsatzTV"
msg_info "Creating Service"
@ -45,6 +42,7 @@ Description=ErsatzTV Service
After=multi-user.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/ErsatzTV
ExecStart=/opt/ErsatzTV/ErsatzTV
@ -54,7 +52,6 @@ RestartSec=30
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
systemctl -q --now enable ersatzTV.service
msg_ok "Created Service"