mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 01:49:56 +08:00
feat: Send commands to weed shell from the docker image.
Add the ability to send commands to weed shell from the docker image. Allows an operator to perform maintenance commands like so: ``` docker run \ --rm \ -e SHELL_FILER=localhost:8888 \ -e SHELL_MASTER=localhost:9333 \ chrislusf/seaweedfs:local \ "shell" \ "fs.configure -locationPrefix=/buckets/foo -volumeGrowthCount=3 -replication=002 -apply" ```
This commit is contained in:
@@ -57,6 +57,12 @@ case "$1" in
|
|||||||
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
|
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
'shell')
|
||||||
|
ARGS="-cluster=$SHELL_CLUSTER -filer=$SHELL_FILER -filerGroup=$SHELL_FILER_GROUP -master=$SHELL_MASTER -options=$SHELL_OPTIONS"
|
||||||
|
shift
|
||||||
|
exec echo "$@" | /usr/bin/weed -logtostderr=true shell $ARGS
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
exec /usr/bin/weed $@
|
exec /usr/bin/weed $@
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user