Created
December 27, 2024 02:25
-
-
Save alangrainger/f8cafacf4f3c75d1b73d3180effca85c to your computer and use it in GitHub Desktop.
Synology NAS, mount multiple encrypted folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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