Compare commits

..

No commits in common. "5a526099f7aad83ded2386d9c38ab9bc6ca1a924" and "4ad7bbd8848e63dd6073e67c1030f23f2637abfe" have entirely different histories.

2 changed files with 5 additions and 2 deletions

View File

@ -19,7 +19,7 @@ EOF
header_info header_info
echo -e "Loading..." echo -e "Loading..."
APP="PiAlert" APP="PiAlert"
var_disk="3" var_disk="6"
var_cpu="1" var_cpu="1"
var_ram="512" var_ram="512"
var_os="debian" var_os="debian"

View File

@ -55,6 +55,7 @@ msg_ok "Installed Python Dependencies"
msg_info "Installing Pi.Alert" 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 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 rm -rf /var/www/html/index.html
mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old 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 ln -s /opt/pialert/install/index.html /var/www/html/index.html
@ -68,10 +69,12 @@ 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 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" ln -s "$src_dir/$file" "$dest_dir/$file"
done 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#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 sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron
crontab /opt/pialert/install/pialert.cron crontab /opt/pialert/install/pialert.cron
echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update
sed -i 's/~/\/opt/g' /usr/bin/update
chmod +x /usr/bin/update chmod +x /usr/bin/update
echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan
chmod +x /usr/bin/scan chmod +x /usr/bin/scan