leiweibau / Pi.Alert

Scan the devices connected to your WIFI / LAN and alert you the connection of unknown devices. It also warns if a "always connected" device disconnects. In addition, it is possible to check web services for availability. For this purpose HTTP status codes and the response time of the service are evaluated.
https://leiweibau.net
GNU General Public License v3.0
334 stars 25 forks source link

[Bug] Provided Update-Script don't work with Pi.Alert LXC #281

Closed katomic closed 3 months ago

katomic commented 3 months ago

System Information Architecture is proxmox container (amd64) Pi.Alert version: 2024 Puche & leiweibau (2024-02-24)

Describe the bug running the update command bash -c "$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)" in the container's console results in this error:

Pi.Alert directory dosn't exists: /root/pialert

Viewing logfile:

root@pialert:~# cat pialert_update_2024-03-22_10-13.log

############################################################################

You are planning to update Pi.Alert. Please make sure that no scan takes

place during the update to avoid possible database errors afterwards!!!

This can be done by pausing the Arp scan via the settings page. However,

scans that are already running will not be terminated. For more

information, check the Help/FAQ section in Pi.Alert

############################################################################

############################################################ Pi.Alert Update ############################################################ Fri Mar 22 10:13:04 SAST 2024 Logfile: pialert_update_2024-03-22_10-13.log



ERROR UPDATING PI.ALERT



Pi.Alert directory dosn't exists: /root/pialert

Use 'cat pialert_update_2024-03-22_10-13.log' to view update log

root@pialert:~#

leiweibau commented 3 months ago

At first: I would have expected at least a short description of the error in the title to make it a little easier for me as the maintainer. But thank you for drawing my attention to the misunderstanding in the template. I will probably have to invest some more work here.

Now to the actual problem: If you use the LXC version, you must also use the update script that @tteck offers.

To create a new Proxmox VE Pi.Alert LXC, run the command below in the Proxmox VE Shell.
To Update Pi.Alert, run the command below (or type update) in the LXC Console.
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pialert.sh)"
katomic commented 3 months ago

At first: I would have expected at least a short description of the error in the title to make it a little easier for me as the maintainer. But thank you for drawing my attention to the misunderstanding in the template. I will probably have to invest some more work here.

Now to the actual problem: If you use the LXC version, you must also use the update script that @tteck offers.

To create a new Proxmox VE Pi.Alert LXC, run the command below in the Proxmox VE Shell.
To Update Pi.Alert, run the command below (or type update) in the LXC Console.
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/pialert.sh)"

Thank you for your prompt reply! I did not think to see if @tteck had an update script for your branch. Nice work all the same!

PS, Does your branch support the same network graph that is seen here: https://github.com/jokob-sk/Pi.Alert/blob/main/docs/img/network.png ?

leiweibau commented 3 months ago

I did not think to see if @tteck had an update script for your branch.

In principle, @tteck also uses my update script, but he uses undocumented switches, which we have defined so that the installation in the LXC container works according to his specifications.

Does your branch support the same network graph that is seen here

No, unfortunately this is not possible. This is due to the different "philosophies" on which this is based.

The representation chosen by @jokob-sk basically shows the hierarchy. This also works quite well in the flow chart and I admit that I also like it.

However, I would like to show the port assignments. Here it can also be that a switch is connected 2x to the same router, then 2x to another switch. This 2nd switch is also connected 2x to the router and a 2nd router. This makes it difficult to use a flowchart that only shows one connection (line) at a time. There are also JS libraries that can map something like this, but unfortunately mainly on an API basis (basic or paid) (https://github.com/mermaid-js/mermaid). On my site, the port composition is so convoluted that I'm not even sure if I would implement it if the JS libraries were free/self-hosted.