feat: Add auto mount script.
This commit is contained in:
17
scripts/mountNfs.sh
Normal file
17
scripts/mountNfs.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# NFS Server 和 目录
|
||||||
|
REMOTE_HOST=192.168.124.1
|
||||||
|
REMOTE_PATH=/home/data/Storage/Raw
|
||||||
|
MOUNT_POINT=/mnt/nfs
|
||||||
|
|
||||||
|
# 尝试挂载
|
||||||
|
# 已挂载则退出
|
||||||
|
if mountpoint -q "$MOUNT_POINT"; then
|
||||||
|
echo "Already mounted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
mount -t nfs "${REMOTE_HOST}:${REMOTE_PATH}" "$MOUNT_POINT"
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user