Created
January 15, 2024 14:34
-
-
Save joeperpetua/02895872252c51d1cb48f170c0d64363 to your computer and use it in GitHub Desktop.
Change version number in all enabled Synology Drive Team 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
synowebapi --exec api=SYNO.SynologyDrive.Share method=list version=1 action=list sort_direction=ASC sor_by=share_name | jq '.data.items[] | "\(.share_name) \(.share_enable)"' | grep true | sed 's/ true//g' > /tmp/enabled_shares; cat /tmp/enabled_shares | while read share; do synowebapi --exec api=SYNO.SynologyDrive.Share method=set version=1 share="[{\"share_name\": `echo $share`, \"rotate_cnt\": 5}]" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment