gallery: finishing installing thumbsup

This commit is contained in:
Romain Bazile 2020-12-03 14:19:13 +01:00
parent bbd3146f7c
commit 841d9b8831
3 changed files with 37 additions and 11 deletions

View file

@ -34,6 +34,13 @@
"disabled": false, "disabled": false,
"info": "" "info": ""
}, },
{
"id": "c1660bc.e7ff7f8",
"type": "tab",
"label": "Gallery",
"disabled": false,
"info": ""
},
{ {
"id": "1371dec5.76e671", "id": "1371dec5.76e671",
"type": "tab", "type": "tab",
@ -55,13 +62,6 @@
"disabled": false, "disabled": false,
"info": "" "info": ""
}, },
{
"id": "c1660bc.e7ff7f8",
"type": "tab",
"label": "Gallery",
"disabled": false,
"info": ""
},
{ {
"id": "9a22e67a.378818", "id": "9a22e67a.378818",
"type": "tab", "type": "tab",
@ -304,8 +304,8 @@
"name": "Gallery", "name": "Gallery",
"icon": "fa fa-file-image-o", "icon": "fa fa-file-image-o",
"order": 6, "order": 6,
"disabled": true, "disabled": false,
"hidden": true "hidden": false
}, },
{ {
"id": "c0ebfc57.42527", "id": "c0ebfc57.42527",
@ -380,7 +380,6 @@
"id": "196518b2.4d53b7", "id": "196518b2.4d53b7",
"type": "ui_group", "type": "ui_group",
"z": "", "z": "",
"d": true,
"name": "Group 5", "name": "Group 5",
"tab": "3a6bb13f.c9703e", "tab": "3a6bb13f.c9703e",
"order": 5, "order": 5,
@ -7340,7 +7339,10 @@
"64f61762.68c788", "64f61762.68c788",
"8b511c2b.9c24c8" "8b511c2b.9c24c8"
], ],
[], [
"64f61762.68c788",
"8b511c2b.9c24c8"
],
[] []
] ]
}, },

View file

@ -26,6 +26,17 @@ function special(){
${log} "Error when installing thumbsup" ${log} "Error when installing thumbsup"
fi fi
sudo chown -R root:root /usr/lib/node_modules/ 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 fi
} }

View file

@ -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;
}
}