mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-26 07:52:56 +08:00
Merge pull request #1290 from tmunsch/patch-9
Changed Minio Start parameters
This commit is contained in:
commit
831797d618
@ -4,31 +4,31 @@ echo "$(tput setaf 2)Starting up...."
|
||||
echo "Startup Type: $(tput setaf 2)$STARTUP_TYPE"
|
||||
if [ -f "keys/key.txt" ]; then
|
||||
echo "$(tput setaf 2)Key file detected..."
|
||||
export MINIO_ACCESS_KEY=`cat keys/key.txt`
|
||||
export MINIO_ROOT_USER=`cat keys/key.txt`
|
||||
else
|
||||
echo minioadmin > keys/key.txt
|
||||
echo "$(tput setaf 3)No key file detected...Preparing First Time Boot"
|
||||
fi
|
||||
if [ -f "keys/secret.txt" ]; then
|
||||
echo "$(tput setaf 2)Secret file detected..."
|
||||
export MINIO_SECRET_KEY=`cat keys/secret.txt`
|
||||
export MINIO_ROOT_PASSWORD=`cat keys/secret.txt`
|
||||
else
|
||||
echo minioadmin > keys/secret.txt
|
||||
echo "No secret file detected...Preparing First Time Boot"
|
||||
fi
|
||||
if [ -f "keys/oldsecret.txt" ]; then
|
||||
echo "$(tput setaf 1)Old secret file detected..."
|
||||
export MINIO_SECRET_KEY_OLD=`cat keys/oldsecret.txt`
|
||||
export MINIO_ROOT_PASSWORD_OLD=`cat keys/oldsecret.txt`
|
||||
fi
|
||||
if [ -f "keys/oldkey.txt" ]; then
|
||||
echo "$(tput setaf 1)Old key file detected..."
|
||||
export MINIO_ACCESS_KEY_OLD=`cat keys/oldkey.txt`
|
||||
export MINIO_ROOT_USER_OLD=`cat keys/oldkey.txt`
|
||||
fi
|
||||
if [ -f "keys/justrotated.txt" ]; then
|
||||
echo "$(tput setaf 3)Previous key rotation detected...."
|
||||
echo "$(tput setaf 3)Clearing the Lanes...."
|
||||
unset MINIO_ACCESS_KEY_OLD
|
||||
unset MINIO_SECRET_KEY_OLD
|
||||
unset MINIO_ROOT_USER_OLD
|
||||
unset MINIO_ROOT_PASSWORD_OLD
|
||||
echo "$(tput setaf 2)Lanes Cleared!"
|
||||
STARTUP_TYPE=normal
|
||||
rm keys/justrotated.txt
|
||||
@ -49,21 +49,21 @@ fi
|
||||
##########################################
|
||||
if [ -z "$STARTUP_TYPE" ] || [ "$STARTUP_TYPE" == "rotate" ]; then
|
||||
touch keys/justrotated.txt
|
||||
export MINIO_ACCESS_KEY_OLD=$MINIO_ACCESS_KEY
|
||||
echo $MINIO_ACCESS_KEY_OLD > keys/oldkey.txt
|
||||
export MINIO_SECRET_KEY_OLD=$MINIO_SECRET_KEY
|
||||
echo $MINIO_SECRET_KEY_OLD > keys/oldsecret.txt
|
||||
export MINIO_ACCESS_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $MINIO_ACCESS_KEY > keys/key.txt
|
||||
export MINIO_SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $MINIO_SECRET_KEY > keys/secret.txt
|
||||
echo "Your New Access Key is: $(tput setaf 2)$MINIO_ACCESS_KEY"
|
||||
echo "Your New Secret Key is: $(tput setaf 2)$MINIO_SECRET_KEY"
|
||||
echo "Your Old Access Key is: $(tput setaf 3)$MINIO_ACCESS_KEY_OLD"
|
||||
echo "Your Old Access Key is: $(tput setaf 3)$MINIO_SECRET_KEY_OLD"
|
||||
export MINIO_ROOT_USER_OLD=$MINIO_ROOT_USER
|
||||
echo $MINIO_ROOT_USER_OLD > keys/oldkey.txt
|
||||
export MINIO_ROOT_PASSWORD_OLD=$MINIO_ROOT_PASSWORD
|
||||
echo $MINIO_ROOT_PASSWORD_OLD > keys/oldsecret.txt
|
||||
export MINIO_ROOT_USER=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $MINIO_ROOT_USER > keys/key.txt
|
||||
export MINIO_ROOT_PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $MINIO_ROOT_PASSWORD > keys/secret.txt
|
||||
echo "Your New Access Key is: $(tput setaf 2)$MINIO_ROOT_USER"
|
||||
echo "Your New Secret Key is: $(tput setaf 2)$MINIO_ROOT_PASSWORD"
|
||||
echo "Your Old Access Key is: $(tput setaf 3)$MINIO_ROOT_USER_OLD"
|
||||
echo "Your Old Access Key is: $(tput setaf 3)$MINIO_ROOT_PASSWORD_OLD"
|
||||
echo "$(tput setaf 2)Booting..."
|
||||
./minio server data --address 0.0.0.0:$SERVER_PORT
|
||||
./minio server data --console-address ":$SERVER_PORT"
|
||||
else
|
||||
echo "$(tput setaf 2)Booting..."
|
||||
./minio server data --address 0.0.0.0:$SERVER_PORT
|
||||
./minio server data --console-address ":$SERVER_PORT"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user