fix(s3/init):lab4 make mc-init idempotent without grep and mktemp
This commit is contained in:
+1
-3
@@ -41,9 +41,7 @@ cat >"$POLICY_FILE" <<EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
if ! mc admin policy list bootstrap 2>/dev/null | grep -qw 'messenger-api'; then
|
||||
mc admin policy create bootstrap messenger-api "$POLICY_FILE"
|
||||
fi
|
||||
mc admin policy create bootstrap messenger-api "$POLICY_FILE" 2>/dev/null || true
|
||||
|
||||
mc admin policy attach bootstrap messenger-api --user "$API_ID" 2>/dev/null || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user