Browse Source

Script to detach

Bob Mottram 10 years ago
parent
commit
f830a54150
1 changed files with 17 additions and 0 deletions
  1. 17
    0
      install-freedombone.sh

+ 17
- 0
install-freedombone.sh View File

@@ -2726,6 +2726,23 @@ function script_for_attaching_usb_drive {
2726 2726
   ln -s /usr/bin/attach-music /usr/bin/attach-videos
2727 2727
   ln -s /usr/bin/attach-music /usr/bin/attach-pictures
2728 2728
   ln -s /usr/bin/attach-music /usr/bin/attach-media
2729
+
2730
+  echo '#!/bin/bash' > /usr/bin/remove-music
2731
+  echo 'if [ -d /var/media ]; then' >> /usr/bin/remove-music
2732
+  echo '  umount /var/media' >> /usr/bin/remove-music
2733
+  echo '  rm -rf /var/media' >> /usr/bin/remove-music
2734
+  echo 'fi' >> /usr/bin/remove-music
2735
+  chmod +x /usr/bin/remove-music
2736
+  ln -s /usr/bin/remove-music /usr/bin/detach-music
2737
+  ln -s /usr/bin/remove-music /usr/bin/detach-usb
2738
+  ln -s /usr/bin/remove-music /usr/bin/remove-usb
2739
+  ln -s /usr/bin/remove-music /usr/bin/detach-media
2740
+  ln -s /usr/bin/remove-music /usr/bin/remove-media
2741
+  ln -s /usr/bin/remove-music /usr/bin/detach-videos
2742
+  ln -s /usr/bin/remove-music /usr/bin/remove-videos
2743
+  ln -s /usr/bin/remove-music /usr/bin/detach-pictures
2744
+  ln -s /usr/bin/remove-music /usr/bin/remove-pictures
2745
+
2729 2746
   echo 'script_for_attaching_usb_drive' >> $COMPLETION_FILE
2730 2747
 }
2731 2748