Skip to content

Commit

Permalink
Safer update of web interface
Browse files Browse the repository at this point in the history
Avoid deleting the content of the teslacam and music mounts if the
unmounts failed, or they somehow got (re)mounted during the upgrade.
  • Loading branch information
marcone committed Jan 16, 2024
1 parent 22c86b8 commit 389654f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup/pi/configure-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ systemctl stop nginx.service &> /dev/null || true
mkdir -p /var/www
umount /var/www/html/TeslaCam &> /dev/null || true
umount /var/www/html/fs/Music &> /dev/null || true
rm -rf /var/www/html
find /var/www/html \( -type f -o -type l \) -mount -print0 | xargs -0 rm
cp -r "$SOURCE_DIR/teslausb-www/html" /var/www/
ln -s /boot/teslausb-headless-setup.log /var/www/html/
ln -s /mutable/archiveloop.log /var/www/html/
ln -s /tmp/diagnostics.txt /var/www/html/
mkdir /var/www/html/TeslaCam
ln -sf /boot/teslausb-headless-setup.log /var/www/html/
ln -sf /mutable/archiveloop.log /var/www/html/
ln -sf /tmp/diagnostics.txt /var/www/html/
mkdir -p /var/www/html/TeslaCam
cp -rf "$SOURCE_DIR/teslausb-www/teslausb.nginx" /etc/nginx/sites-available
ln -sf /etc/nginx/sites-available/teslausb.nginx /etc/nginx/sites-enabled/default

Expand Down

0 comments on commit 389654f

Please sign in to comment.