#!/bin/bash # Remove symlink in /library/content to autmounted usb drive # # based on a similar script in the xs-rsync package # by Martin Langhoff # # and the adaptation for xs-activity-server by Douglas Bagnall # # # by Tim Moody tim@timmoody.com CONTENT_LINK_USB=`basename $UM_MOUNTPOINT | awk '{print toupper($0)}'` CONTENT_LINK="{{ doc_root }}/local_content/$CONTENT_LINK_USB" logger -p user.notice -t "70-usb-library" -- "Attempting to remove link $CONTENT_LINK." if [ -L $CONTENT_LINK ]; then {% if is_debuntu %} /bin/rm $CONTENT_LINK {% else %} /usr/bin/rm $CONTENT_LINK {% endif %} logger -p user.notice -t "70-usb-library" -- "$CONTENT_LINK removed." fi