aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_s3_configure.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-10 00:15:22 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-10 00:15:22 -0800
commit765b3ef1beae5418491e338d397a589186ca4458 (patch)
tree3e2a9b6a3a587a8801e08a3a10786cae8b6653e8 /weed/shell/command_s3_configure.go
parent97c942b5eefcd01428fc663ff2a2ec1be68812db (diff)
downloadseaweedfs-765b3ef1beae5418491e338d397a589186ca4458.tar.xz
seaweedfs-765b3ef1beae5418491e338d397a589186ca4458.zip
save /etc/iam/identity.json inside filer store
Diffstat (limited to 'weed/shell/command_s3_configure.go')
-rw-r--r--weed/shell/command_s3_configure.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/shell/command_s3_configure.go b/weed/shell/command_s3_configure.go
index 42d1048a3..869949a25 100644
--- a/weed/shell/command_s3_configure.go
+++ b/weed/shell/command_s3_configure.go
@@ -169,10 +169,11 @@ func (c *commandS3Configure) Do(args []string, commandEnv *CommandEnv, writer io
fmt.Fprintf(writer, string(buf.Bytes()))
fmt.Fprintln(writer)
-
if *apply {
- if err := filer.SaveAs(commandEnv.option.FilerHost, int(commandEnv.option.FilerPort), filer.IamConfigDirecotry, filer.IamIdentityFile, "text/plain; charset=utf-8", &buf); err != nil {
+ if err := commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
+ return filer.SaveInsideFiler(client, filer.IamConfigDirecotry, filer.IamIdentityFile, buf.Bytes())
+ }); err != nil {
return err
}