diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 7a95f1a7..72bb525f 100755 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -86,10 +86,11 @@ There are 2 approaches how to get PiHole devices imported. Via the PiHole import #### ๐Ÿงญ Community guides -> Primarily use the official installation guides in this document and use community content as suplementary material. Open an issue if you'd like to add your link to the list ๐Ÿ™ +> Use the official installation guides at first and use community content as suplementary material. Open an issue if you'd like to add your link to the list ๐Ÿ™ - ๐Ÿ“„ [How to Install Pi.Alert on Your Synology NAS - Marius hosting (English)](https://mariushosting.com/how-to-install-pi-alert-on-your-synology-nas/) (Updated frequently) - ๐Ÿ“„ [์‹œ๋†€/ํ—ค๋†€์—์„œ ๋„คํŠธ์›Œํฌ ์Šค์บ๋„ˆ Pi.Alert Docker๋กœ ์„ค์น˜ ๋ฐ ์‚ฌ์šฉํ•˜๊ธฐ (Korean)](https://blog.dalso.org/article/%EC%8B%9C%EB%86%80-%ED%97%A4%EB%86%80%EC%97%90%EC%84%9C-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-%EC%8A%A4%EC%BA%90%EB%84%88-pi-alert-docker%EB%A1%9C-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EC%82%AC%EC%9A%A9) (July 2023) +- ๐Ÿ“„ [็ฝ‘็ปœๅ…ฅไพตๆŽขๆต‹ๅ™จPi.Alert (Chinese)](https://codeantenna.com/a/VgUvIAjZ7J) (May 2023) - โ–ถ [Pi.Alert auf Synology & Docker by - Jรผrgen Barth (German)](https://www.youtube.com/watch?v=-ouvA2UNu-A) (March 2023) - โ–ถ [Top Docker Container for Home Server Security - VirtualizationHowto (English)](https://www.youtube.com/watch?v=tY-w-enLF6Q) (March 2023) - โ–ถ [Pi.Alert or WatchYourLAN can alert you to unknown devices appearing on your WiFi or LAN network - Danie van der Merwe (English)](https://www.youtube.com/watch?v=v6an9QG2xF0) (November 2022) diff --git a/dockerfiles/start.sh b/dockerfiles/start.sh index 96a23a03..482b8885 100755 --- a/dockerfiles/start.sh +++ b/dockerfiles/start.sh @@ -11,6 +11,7 @@ INSTALL_DIR=/home/pi # Specify the installation directory here WEB_UI_DIR=/var/www/html/pialert NGINX_CONFIG_FILE=/etc/nginx/conf.d/pialert.conf OUI_FILE="/usr/share/arp-scan/ieee-oui.txt" # Define the path to ieee-oui.txt and ieee-iab.txt +FILEDB=$INSTALL_DIR/pialert/db/pialert.db # DO NOT CHANGE ANYTHING ABOVE THIS LINE! # if custom variables not set we do not need to do anything @@ -94,23 +95,26 @@ fi # Fixing file permissions echo "[INSTALL] Fixing file permissions" +echo "[INSTALL] Fixing WEB_UI_DIR: $WEB_UI_DIR" chmod -R a+rwx $WEB_UI_DIR + +echo "[INSTALL] Fixing INSTALL_DIR: $INSTALL_DIR" + chmod -R a+rw $INSTALL_DIR/pialert/front/log chmod -R a+rwx $INSTALL_DIR -FILEDB=$INSTALL_DIR/pialert/db/pialert.db - -if [ -f "$FILEDB" ]; then - chown -R www-data:www-data $INSTALL_DIR/pialert/db/pialert.db -fi - echo "[INSTALL] Copy starter pialert.db and pialert.conf if they don't exist" # Copy starter pialert.db and pialert.conf if they don't exist cp -n "$INSTALL_DIR/pialert/back/pialert.conf" "$INSTALL_DIR/pialert/config/pialert.conf" -cp -n "$INSTALL_DIR/pialert/back/pialert.db" "$INSTALL_DIR/pialert/db/pialert.db" +cp -n "$INSTALL_DIR/pialert/back/pialert.db" "$FILEDB" +echo "[INSTALL] Fixing permissions after copied starter config & DB" + +if [ -f "$FILEDB" ]; then + chown -R www-data:www-data $FILEDB +fi chmod -R a+rwx $INSTALL_DIR # second time after we copied the files chmod -R a+rw $INSTALL_DIR/pialert/config @@ -122,7 +126,6 @@ if [ ! -f "$INSTALL_DIR/pialert/front/buildtimestamp.txt" ]; then date +%s > "$INSTALL_DIR/pialert/front/buildtimestamp.txt" fi - # start PHP /etc/init.d/php8.2-fpm start /etc/init.d/nginx start