mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-23 07:29:02 +01:00
Update pialert-install.sh
- redirect updates to https://github.com/leiweibau/Pi.Alert - clean code (final)
This commit is contained in:
parent
4ad7bbd884
commit
c7fef220b1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user