Skip to content
Snippets Groups Projects
Commit 33fe1d91 authored by Bob Mottram's avatar Bob Mottram
Browse files

Avoid mesh conflicts between cryptpad and app download site

parent 16d5c2b2
No related branches found
No related tags found
No related merge requests found
......@@ -261,6 +261,11 @@ function mesh_create_app_downloads_page {
if [ ! -d /var/www/html ]; then
return
fi
# Don't go straight to cryptpad when navigating to the peer's IP address
if [ -L /etc/nginx/sites-enabled/cryptpad ]; then
rm /etc/nginx/sites-enabled/cryptpad
systemctl restart nginx
fi
cp /root/$PROJECT_NAME/website/EN/meshindex.html /var/www/html/index.html
if [ ! -f /var/www/html/ssb.apk ]; then
cp /root/$PROJECT_NAME/image_build/mesh_apps/ssb.apk /var/www/html/ssb.apk
......@@ -361,6 +366,14 @@ function start {
systemctl enable hostapd
systemctl restart hostapd
mesh_create_app_downloads_page
else
# Recreate the cryptpad symlink
if [ -f /etc/nginx/sites-available/cryptpad ]; then
if [ ! -L /etc/nginx/sites-enabled/cryptpad ]; then
ln -s /etc/nginx/sites-available/cryptpad /etc/nginx/sites-enabled/cryptpad
systemctl restart nginx
fi
fi
fi
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment