diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 22685273..d230a56c 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -110,12 +110,19 @@ block is not necessary sudo apt-get install lighttpd -y ``` -3.2 - Install PHP +3.2 - If Pi.Alert is the only site available in this webserver, you can redirect + the default server page to pialert subfolder + ``` + sudo mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.html.old + sudo ln -s /home/pi/pialert/install/index.html /var/www/html/index.html + ``` + +3.3 - Install PHP ``` sudo apt-get install php php-cgi php-fpm php-sqlite3 -y ``` -3.3 - Activate PHP +3.4 - Activate PHP ``` sudo lighttpd-enable-mod fastcgi-php sudo service lighttpd force-reload @@ -148,7 +155,7 @@ block is not necessary 5.1 - Download Pi.Alert and uncompress ``` - curl -LO https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_latest.tar + curl -LO https://github.com/pucherot/Pi.Alert/raw/main/tar/pialert_latest.tar tar xvf pialert_latest.tar rm pialert_latest.tar ``` @@ -158,10 +165,13 @@ block is not necessary sudo ln -s /home/pi/pialert/front /var/www/html/pialert ``` -5.3 - Update lighttpd config +5.3 - If you have configured your DNS server (Pi.hole or other) to resolve + the pi.alert to your raspberry, youy must configure lighttpd to redirect + these requests to the correct pialert web folder ``` - sudo sh -c "printf '\n\n\$HTTP[\"host\"] == \"pi.alert\" {\n server.document-root = \"/var/www/html/pialert/\"\n}\n' >> /etc/lighttpd/external.conf" - sudo /etc/init.d/lighttpd restart + sudo cp pialert/front/pialert_front.conf /etc/lighttpd/conf-available + sudo ln -s ../conf-available/pialert_front.conf /etc/lighttpd/conf-enabled/pialert_front.conf + sudo service lighttpd force-reload ``` 5.4 - If you want to use email reporting with gmail diff --git a/install/create_tar.sh b/install/create_tar.sh deleted file mode 100644 index aadff298..00000000 --- a/install/create_tar.sh +++ /dev/null @@ -1,18 +0,0 @@ -# -PIALERT_VERSION=`awk '$1=="VERSION" { print $3 }' ../back/pialert.conf | tr -d \'` -PIALERT_DEV_PATH=/media/WD_4TB/dev - -cd $PIALERT_DEV_PATH -pwd - -ls -l pialert/install/pialert*.tar -tar tvf pialert/install/pialert_latest.tar | wc -l -rm pialert/install/pialert_*.tar - -tar cvf pialert/install/pialert_$PIALERT_VERSION.tar --exclude="pialert/install" --exclude="pialert/.git" pialert | wc -l - -ln -s pialert_$PIALERT_VERSION.tar pialert/install/pialert_latest.tar -ls -l pialert/install/pialert*.tar - - - diff --git a/install/index.html b/install/index.html new file mode 100644 index 00000000..d980ae67 --- /dev/null +++ b/install/index.html @@ -0,0 +1,10 @@ + + + diff --git a/install/pialert_front.conf b/install/pialert_front.conf new file mode 100644 index 00000000..7b4719d1 --- /dev/null +++ b/install/pialert_front.conf @@ -0,0 +1,12 @@ + + +$HTTP["host"] == "pi.alert" { + server.document-root = "/var/www/html/pialert/" +} diff --git a/tar/create_tar.sh b/tar/create_tar.sh new file mode 100644 index 00000000..e68f5329 --- /dev/null +++ b/tar/create_tar.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# ------------------------------------------------------------------------------ +# Pi.Alert +# Open Source Network Guard / WIFI & LAN intrusion detector +# +# create_tar.sh - Create the installation file +# ------------------------------------------------------------------------------ +# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 +# ------------------------------------------------------------------------------ + +PIALERT_VERSION=`awk '$1=="VERSION" { print $3 }' ../back/pialert.conf | tr -d \'` +PIALERT_DEV_PATH=/media/WD_4TB/dev + +# ------------------------------------------------------------------------------ +cd $PIALERT_DEV_PATH +pwd + +# ------------------------------------------------------------------------------ +ls -l pialert/tar/pialert*.tar +tar tvf pialert/tar/pialert_latest.tar | wc -l +rm pialert/tar/pialert_*.tar + +# ------------------------------------------------------------------------------ +tar cvf pialert/tar/pialert_$PIALERT_VERSION.tar --exclude="pialert/tar" --exclude="pialert/.git" pialert | wc -l + +ln -s pialert_$PIALERT_VERSION.tar pialert/tar/pialert_latest.tar +ls -l pialert/tar/pialert*.tar + diff --git a/install/pialert_2.56.tar b/tar/pialert_2.56.tar similarity index 99% rename from install/pialert_2.56.tar rename to tar/pialert_2.56.tar index ff322b9b..45debe30 100644 Binary files a/install/pialert_2.56.tar and b/tar/pialert_2.56.tar differ diff --git a/install/pialert_latest.tar b/tar/pialert_latest.tar similarity index 99% rename from install/pialert_latest.tar rename to tar/pialert_latest.tar index ff322b9b..45debe30 100644 Binary files a/install/pialert_latest.tar and b/tar/pialert_latest.tar differ