Compare commits

...

2 Commits

Author SHA1 Message Date
tteckster 5a526099f7
Update pialert.sh
reduce storage
2023-09-18 14:28:36 -04:00
tteckster c7fef220b1
Update pialert-install.sh
- redirect updates to https://github.com/leiweibau/Pi.Alert
- clean code (final)
2023-09-18 14:27:51 -04:00
2 changed files with 2 additions and 5 deletions

View File

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

View File

@ -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