diff --git a/flows/main.json b/flows/main.json index c03f24f..55fedcc 100644 --- a/flows/main.json +++ b/flows/main.json @@ -34,6 +34,13 @@ "disabled": false, "info": "" }, + { + "id": "c1660bc.e7ff7f8", + "type": "tab", + "label": "Gallery", + "disabled": false, + "info": "" + }, { "id": "1371dec5.76e671", "type": "tab", @@ -55,13 +62,6 @@ "disabled": false, "info": "" }, - { - "id": "c1660bc.e7ff7f8", - "type": "tab", - "label": "Gallery", - "disabled": false, - "info": "" - }, { "id": "9a22e67a.378818", "type": "tab", @@ -304,8 +304,8 @@ "name": "Gallery", "icon": "fa fa-file-image-o", "order": 6, - "disabled": true, - "hidden": true + "disabled": false, + "hidden": false }, { "id": "c0ebfc57.42527", @@ -380,7 +380,6 @@ "id": "196518b2.4d53b7", "type": "ui_group", "z": "", - "d": true, "name": "Group 5", "tab": "3a6bb13f.c9703e", "order": 5, @@ -7340,7 +7339,10 @@ "64f61762.68c788", "8b511c2b.9c24c8" ], - [], + [ + "64f61762.68c788", + "8b511c2b.9c24c8" + ], [] ] }, diff --git a/scripts/bash/update.sh b/scripts/bash/update.sh index e591b0c..38dc267 100755 --- a/scripts/bash/update.sh +++ b/scripts/bash/update.sh @@ -26,6 +26,17 @@ function special(){ ${log} "Error when installing thumbsup" fi sudo chown -R root:root /usr/lib/node_modules/ + ${log} "Thumbsup installed, installing dependencies now" + sudo apt install -y libimage-exiftool-perl graphicsmagick + sudo apt autoremove -y + ${log} "Install complete, running thumbsup for the first time now" + thumbsup --config /home/pi/PlanktonScope/scripts/thumbsup/config.json + fi + if ![[ -f "/etc/nginx/sites-available/gallery.conf" ]]; then + ${log} "Nginx config is not installed, doing that now" + sudo cp /home/pi/PlanktonScope/scripts/thumbsup/gallery.conf /etc/nginx/sites-available/gallery.conf + sudo ln -s /etc/nginx/sites-available/gallery.conf /etc/nginx/sites-enabled/gallery.conf + sudo nginx -t && sudo systemctl reload nginx fi } diff --git a/scripts/thumbsup/gallery.conf b/scripts/thumbsup/gallery.conf new file mode 100644 index 0000000..f077f9c --- /dev/null +++ b/scripts/thumbsup/gallery.conf @@ -0,0 +1,13 @@ +server { + listen 80; + listen [::]:80; + + root /home/pi/gallery; + server_name localhost; + autoindex off; + + # index.html fallback + location / { + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file