1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 11:12:06 +00:00

70-usb-library.j2: Forcibly delete e.g. stale /library/www/html/local_content/USB0

This commit is contained in:
A Holt 2025-02-11 03:13:51 -05:00 committed by GitHub
parent c2c36b178e
commit 2398313918
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,4 +57,7 @@ fi
CONTENT_LINK_USB=$(basename $UM_MOUNTPOINT | awk '{print toupper($0)}')
CONTENT_LINK="{{ doc_root }}/local_content/$CONTENT_LINK_USB"
logger -t "usb_lib (70-usb-library)" "Creating link from $CONTENT_LINK to $SHARE_DIR"
ln -sf $SHARE_DIR $CONTENT_LINK
# 'rm -rf' even stronger than 'ln -nsf' and 'ln -Tsf'
# https://serverfault.com/questions/147787/how-to-update-a-symbolic-link-target-ln-f-s-not-working/522483#522483
rm -rf $CONTENT_LINK
ln -s $SHARE_DIR $CONTENT_LINK