|
@@ -6,6 +6,7 @@ source .env
|
|
|
# Execute unmount command on the server via SSH and capture output
|
|
|
OUTPUT=$(ssh -i "$SSH_KEY" -p "$SSH_PORT" "$SERVER_USER@$SERVER_IP" << EOF
|
|
|
# Try to unmount the HDD and handle errors
|
|
|
+ sudo /usr/bin/sync "$MOUNT_POINT"
|
|
|
sudo /bin/umount "$MOUNT_POINT" $1
|
|
|
if [ \$? -ne 0 ]; then
|
|
|
echo "Failed to unmount HDD from $MOUNT_POINT."
|