Compare commits

..

No commits in common. "16bdcb3cb16974acd0ee84b67d22d5ed5deb45ff" and "d1da3949eac9e7f9a7ced9ba51d957b5f59b8aeb" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View File

@ -19,7 +19,7 @@ EOF
header_info header_info
echo -e "Loading..." echo -e "Loading..."
APP="PiAlert" APP="PiAlert"
var_disk="6" var_disk="3"
var_cpu="1" var_cpu="1"
var_ram="512" var_ram="512"
var_os="debian" var_os="debian"
@ -53,8 +53,8 @@ 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 /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
update msg_error "There is currently no update path available."
msg_ok "Updated $APP" exit
} }
start start

View File

@ -53,8 +53,8 @@ $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" msg_info "Installing Pi.Alert (Patience)"
curl -sL https://github.com/leiweibau/Pi.Alert/raw/main/tar/pialert_latest.tar | tar xvf - -C /opt >/dev/null 2>&1 git clone -q https://github.com/leiweibau/Pi.Alert.git /opt/pialert
mkdir -p /opt/pialert/front/reports 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
@ -69,13 +69,9 @@ 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 -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab -
cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update
sed -i 's/~/\/opt/g' /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
echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions