mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "ed674aaedd5695c8de2276b77ace3b7d170a3c51" and "28b290c4e5aa34094bb0bc74b9108d3eececc28f" have entirely different histories.
ed674aaedd
...
28b290c4e5
|
@ -52,8 +52,11 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
msg_error "There is currently no update path available."
|
msg_info "Updating $APP LXC"
|
||||||
|
apt-get update &>/dev/null
|
||||||
|
apt-get -y upgrade &>/dev/null
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ $STD apt-get -y install \
|
||||||
sudo \
|
sudo \
|
||||||
mc \
|
mc \
|
||||||
curl \
|
curl \
|
||||||
git \
|
|
||||||
apt-utils \
|
apt-utils \
|
||||||
lighttpd \
|
lighttpd \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
|
@ -53,22 +52,33 @@ $STD pip3 install fritzconnection
|
||||||
$STD pip3 install cryptography
|
$STD pip3 install cryptography
|
||||||
msg_ok "Installed Python Dependencies"
|
msg_ok "Installed Python Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Pi.Alert (Patience)"
|
msg_info "Installing Pi.Alert"
|
||||||
git clone -q https://github.com/leiweibau/Pi.Alert.git /opt/pialert
|
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 /opt/pialert/{docs,install,tar}
|
rm /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
|
||||||
ln -s /opt/pialert/front /var/www/html/pialert
|
ln -s /opt/pialert/front /var/www/html/pialert
|
||||||
chmod go+x /opt/pialert /opt/pialert/back/shoutrrr/x86/shoutrrr
|
chmod go+x /opt/pialert
|
||||||
chgrp -R www-data /opt/pialert/db /opt/pialert/front/reports /opt/pialert/config /opt/pialert/config/pialert.conf
|
chgrp -R www-data /opt/pialert/db
|
||||||
chmod -R 775 /opt/pialert/db /opt/pialert/db/temp /opt/pialert/config /opt/pialert/front/reports
|
chmod -R 775 /opt/pialert/db
|
||||||
touch /opt/pialert/log/pialert.vendors.log /opt/pialert/log/pialert.IP.log /opt/pialert/log/pialert.1.log /opt/pialert/log/pialert.cleanup.log /opt/pialert/log/pialert.webservices.log
|
chmod -R 775 /opt/pialert/db/temp
|
||||||
src_dir="/opt/pialert/log"
|
chgrp www-data /opt/pialert/config
|
||||||
dest_dir="/opt/pialert/front/php/server"
|
chmod -R 775 /opt/pialert/config
|
||||||
for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log pialert.webservices.log; do
|
chgrp www-data /opt/pialert/config/pialert.conf
|
||||||
ln -s "$src_dir/$file" "$dest_dir/$file"
|
chmod -R 775 /opt/pialert/front/reports
|
||||||
done
|
chgrp -R www-data /opt/pialert/front/reports
|
||||||
|
chmod +x /opt/pialert/back/shoutrrr/x86/shoutrrr
|
||||||
|
touch "/opt/pialert/log/pialert.vendors.log"
|
||||||
|
touch "/opt/pialert/log/pialert.IP.log"
|
||||||
|
touch "/opt/pialert/log/pialert.1.log"
|
||||||
|
touch "/opt/pialert/log/pialert.cleanup.log"
|
||||||
|
touch "/opt/pialert/log/pialert.webservices.log"
|
||||||
|
ln -s "/opt/pialert/log/pialert.vendors.log" "/opt/pialert/front/php/server/pialert.vendors.log"
|
||||||
|
ln -s "/opt/pialert/log/pialert.IP.log" "/opt/pialert/front/php/server/pialert.IP.log"
|
||||||
|
ln -s "/opt/pialert/log/pialert.1.log" "/opt/pialert/front/php/server/pialert.1.log"
|
||||||
|
ln -s "/opt/pialert/log/pialert.cleanup.log" "/opt/pialert/front/php/server/pialert.cleanup.log"
|
||||||
|
ln -s "/opt/pialert/log/pialert.webservices.log" "/opt/pialert/front/php/server/pialert.webservices.log"
|
||||||
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
|
||||||
msg_ok "Installed Pi.Alert"
|
msg_ok "Installed Pi.Alert"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue