forked from AvinashReddy3108/rclone-mount-magisk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·31 lines (28 loc) · 800 Bytes
/
Copy pathuninstall.sh
File metadata and controls
executable file
·31 lines (28 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
echo "Un-mounting remotes..."
CONFIGFILE=/sdcard/.rclone/rclone.conf
CLOUDROOTMOUNTPOINT=/mnt/cloud/
mkdir -p $CLOUDROOTMOUNTPOINT
$MODDIR/rclone listremotes --config ${CONFIGFILE}|cut -f1 -d: |
while read line; do
echo "Un-mounting [$line] ..."
umount -f ${CLOUDROOTMOUNTPOINT}/${line}
sleep 1
done
echo "... done"
# Don't modify anything after this
if [ -f $INFO ]; then
while read LINE; do
if [ "$(echo -n $LINE | tail -c 1)" == "~" ]; then
continue
elif [ -f "$LINE~" ]; then
mv -f $LINE~ $LINE
else
rm -f $LINE
while true; do
LINE=$(dirname $LINE)
[ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE
done
fi
done < $INFO
rm -f $INFO
fi