Browse Source

fix lint

pull/5023/head
Scruel Tao 9 months ago
parent
commit
ff090d2f74
  1. 4
      deploy/synology_dsm.sh

4
deploy/synology_dsm.sh

@ -190,13 +190,13 @@ synology_dsm_deploy() {
fi fi
_debug "Creating temp admin user in Synology DSM..." _debug "Creating temp admin user in Synology DSM..."
if synogroup --help | grep -q '\-\-memberadd '; then if synogroup --help | grep -q '\-\-memberadd '; then
_temp_admin_create $SYNO_USERNAME $SYNO_PASSWORD
_temp_admin_create "$SYNO_USERNAME" "$SYNO_PASSWORD"
synogroup --memberadd administrators "$SYNO_USERNAME" >/dev/null synogroup --memberadd administrators "$SYNO_USERNAME" >/dev/null
elif synogroup --help | grep -q '\-\-member '; then elif synogroup --help | grep -q '\-\-member '; then
# For supporting DSM 6.x which only has `--member` parameter. # For supporting DSM 6.x which only has `--member` parameter.
cur_admins=$(synogroup --get administrators | awk -F '[][]' '/Group Members/,0{if(NF>1)printf "%s ", $2}') cur_admins=$(synogroup --get administrators | awk -F '[][]' '/Group Members/,0{if(NF>1)printf "%s ", $2}')
if [ -n "$cur_admins" ]; then if [ -n "$cur_admins" ]; then
_temp_admin_create $SYNO_USERNAME $SYNO_PASSWORD
_temp_admin_create "$SYNO_USERNAME" "$SYNO_PASSWORD"
_secure_debug3 admin_users "$cur_admins$SYNO_USERNAME" _secure_debug3 admin_users "$cur_admins$SYNO_USERNAME"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
synogroup --member administrators $cur_admins $SYNO_USERNAME >/dev/null synogroup --member administrators $cur_admins $SYNO_USERNAME >/dev/null

Loading…
Cancel
Save