only unmount my processes
This commit is contained in:
@@ -17,7 +17,7 @@ _helpexit() {
|
|||||||
|
|
||||||
_current_mounts() {
|
_current_mounts() {
|
||||||
echo Current mounts:
|
echo Current mounts:
|
||||||
cat /proc/mounts | grep fuse.sshfs | awk '{ print $1 " " $2 }' | sed "s,$HOME,~," | xargs printf "%15s %s\n"
|
cat /proc/mounts | grep fuse.sshfs | grep user_id=$( id -u ) | awk '{ print $1 " " $2 }' | sed "s,$HOME,~," | xargs printf "%15s %s\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
_hosts() {
|
_hosts() {
|
||||||
@@ -80,7 +80,7 @@ if [[ "$unmount" = true ]]; then
|
|||||||
rmdir --ignore-fail-on-non-empty ~/mnt/$valid_name &>/dev/null
|
rmdir --ignore-fail-on-non-empty ~/mnt/$valid_name &>/dev/null
|
||||||
else
|
else
|
||||||
# no path, unmount all
|
# no path, unmount all
|
||||||
cat /proc/mounts | grep fuse.sshfs | awk '{ print $2 }' | while read dir; do
|
cat /proc/mounts | grep fuse.sshfs | grep user_id=$( id -u ) | awk '{ print $2 }' | while read dir; do
|
||||||
echo Unmounting $dir
|
echo Unmounting $dir
|
||||||
fusermount -u -z "$dir"
|
fusermount -u -z "$dir"
|
||||||
rmdir --ignore-fail-on-non-empty "$dir" &>/dev/null
|
rmdir --ignore-fail-on-non-empty "$dir" &>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user