Skip to content

Instantly share code, notes, and snippets.

@alangrainger
Created December 27, 2024 02:25
Show Gist options
  • Save alangrainger/f8cafacf4f3c75d1b73d3180effca85c to your computer and use it in GitHub Desktop.
Save alangrainger/f8cafacf4f3c75d1b73d3180effca85c to your computer and use it in GitHub Desktop.
Synology NAS, mount multiple encrypted folders
#!/bin/bash
# To make your life easier, add synoshare to /etc/sudoers
# your_user_account ALL=(ALL) NOPASSWD: /usr/syno/sbin/synoshare
shares=(
"Some folder"
"Another shared folder"
"blah_blah"
)
read -sp "Enter encryption password: " password
echo -e "\necho Mounting drives..."
for share in "${shares[@]}"; do
sudo synoshare --enc_mount "$share" "$password"
done
echo Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment