mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
separate tar and install folders
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
10
install/index.html
Normal file
10
install/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# index.html - Redirect file to pialert subdirectory
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
<meta http-equiv="refresh" content="0; url=pialert"/>
|
||||
12
install/pialert_front.conf
Normal file
12
install/pialert_front.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- ---------------------------------------------------------------------------
|
||||
# Pi.Alert
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector
|
||||
#
|
||||
# index.html - Redirect file to pialert subdirectory
|
||||
#-------------------------------------------------------------------------------
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
#--------------------------------------------------------------------------- -->
|
||||
|
||||
$HTTP["host"] == "pi.alert" {
|
||||
server.document-root = "/var/www/html/pialert/"
|
||||
}
|
||||
28
tar/create_tar.sh
Normal file
28
tar/create_tar.sh
Normal file
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user