From c7fef220b165c1abd6fdf8321693188fdf79aaa0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 18 Sep 2023 14:27:51 -0400 Subject: [PATCH] Update pialert-install.sh - redirect updates to https://github.com/leiweibau/Pi.Alert - clean code (final) --- install/pialert-install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 394ac8e2..3c3ba4ad 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -55,7 +55,6 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Pi.Alert" curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 -mkdir -p /opt/pialert/front/reports rm -rf /var/www/html/index.html mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old ln -s /opt/pialert/install/index.html /var/www/html/index.html @@ -69,12 +68,10 @@ dest_dir="/opt/pialert/front/php/server" for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log pialert.webservices.log; do ln -s "$src_dir/$file" "$dest_dir/$file" done -git config --global --add safe.directory /opt/pialert sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron crontab /opt/pialert/install/pialert.cron -cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update -sed -i 's/~/\/opt/g' /usr/bin/update +echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update chmod +x /usr/bin/update echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan chmod +x /usr/bin/scan