Skip to content

Instantly share code, notes, and snippets.

@joeperpetua
Created January 15, 2024 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeperpetua/02895872252c51d1cb48f170c0d64363 to your computer and use it in GitHub Desktop.
Save joeperpetua/02895872252c51d1cb48f170c0d64363 to your computer and use it in GitHub Desktop.
Change version number in all enabled Synology Drive Team Folders
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