Skripte/Utility/IsMounted.sh

29 lines
610 B
Bash

#!/bin/bash
is_mounted() {
local mount_point="$1"
if mount | grep -q "on $mount_point type"; then
return 0 # Bereits gemountet
else
return 1 # Nicht gemountet
fi
}
is_webdav_mounted() {
local mount_point="$1"
if mount | grep -q "on $mount_point type davfs"; then
return 0 # WebDAV ist gemountet
else
return 1 # WebDAV ist nicht gemountet
fi
}
is_nfs_mounted() {
local mount_point="$1"
if mount | grep -q "on $mount_point type nfs"; then
return 0 # NFS ist gemountet
else
return 1 # NFS ist nicht gemountet
fi
}