1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

bring back umount.d/70-usb-library.j2

This commit is contained in:
Jerry Vonau 2025-02-15 23:51:04 -06:00
parent aa8ce5841d
commit 7fb780aea2
4 changed files with 13 additions and 9 deletions

View file

@ -95,7 +95,6 @@
- { src: 'usbmount/usbmount', dest: '/usr/local/sbin/', mode: '0755' }
- { src: 'usbmount/usbmount.rules', dest: '/etc/udev/rules.d/usbmount.rules', mode: '0644' }
- { src: 'usbmount/usbmount@.service', dest: '/etc/systemd/system/usbmount@.service', mode: '0644' }
- { src: 'usbmount/iiab-clean-usb.sh', dest: '/etc/usbmount/umount.d/iiab-clean-usb.sh', mode: '0755' }
- name: Add dir {{ doc_root }}/upload2usb (0775) owned by {{ apache_user }}:{{ apache_user }}
file:

View file

@ -1,3 +1,11 @@
- name: Install /etc/usbmount/umount.d/70-usb-library from template
template:
src: umount.d/70-usb-library.j2
dest: /etc/usbmount/umount.d/70-usb-library
owner: root
group: root
mode: '0751'
- name: Install /etc/usbmount/mount.d/70-usb-library from template, if usb_lib_enabled
template:
src: mount.d/70-usb-library.j2

View file

@ -8,17 +8,14 @@
# <douglas@paradise.net.nz>
#
# by Tim Moody tim@timmoody.com
# Jerry Vonau jvonau3@gmail.com
CONTENT_LINK_USB=`basename $UM_MOUNTPOINT | awk '{print toupper($0)}'`
CONTENT_LINK_USB=$(basename $UM_MOUNTPOINT | awk '{print toupper($0)}')
CONTENT_LINK="{{ doc_root }}/local_content/$CONTENT_LINK_USB"
logger -p user.notice -t "usb_lib (70-usb-library)" -- "Attempting to remove link $CONTENT_LINK."
logger -p user.notice -t "usbmount (70-usb-library)" -- "Attempting to remove link $CONTENT_LINK."
if [ -L $CONTENT_LINK ]; then
{% if is_debuntu %}
/bin/rm -f $CONTENT_LINK
{% else %}
/usr/bin/rm -f $CONTENT_LINK
{% endif %}
logger -p user.notice -t "usb_lib (70-usb-library)" -- "$CONTENT_LINK removed."
rm -f $CONTENT_LINK
logger -p user.notice -t "usbmount (70-usb-library)" -- "$CONTENT_LINK removed."
fi