Compare commits

..

No commits in common. "6c155c7463a3c22bc73aed0165ba879f5d70dff4" and "cfa1b2e04d9056fe96981677bd856f7111ad9495" have entirely different histories.

2 changed files with 8 additions and 10 deletions

View File

@ -57,20 +57,22 @@ function default_settings() {
function update_script() { function update_script() {
header_info header_info
if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
fi
msg_info "Stopping ErsatzTV" msg_info "Stopping ErsatzTV"
systemctl stop ersatzTV systemctl stop ersatzTV
msg_ok "Stopped ErsatzTV" msg_ok "Stopped ErsatzTV"
msg_info "Updating ErsatzTV" msg_info "Updating ErsatzTV"
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1) RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
cp -R /opt/ErsatzTV/ ErsatzTV-backup if [ -d /opt/ErsatzTV/ErsatzTV_bak ]; then
rm ErsatzTV-backup/ErsatzTV rm -rf /opt/ErsatzTV/ErsatzTV_bak
rm -rf /opt/ErsatzTV fi
mv /opt/ErsatzTV/ErsatzTV /opt/ErsatzTV/ErsatzTV_bak
wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt 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 mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV
cp -R ErsatzTV-backup/* /opt/ErsatzTV/
rm -rf ErsatzTV-backup
msg_ok "Updated ErsatzTV" msg_ok "Updated ErsatzTV"
msg_info "Starting ErsatzTV" msg_info "Starting ErsatzTV"

View File

@ -17,10 +17,6 @@ cat <<"EOF"
EOF EOF
} }
header_info header_info
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
echo "AVX instruction set is not supported on this CPU."
exit
fi
echo -e "Loading..." echo -e "Loading..."
APP="Unifi" APP="Unifi"
var_disk="8" var_disk="8"