feat: sets the absolute path of the script

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-07-09 15:28:19 +08:00
parent b6e108774a
commit 7426ee0abe
11 changed files with 78 additions and 37 deletions
+2 -6
View File
@@ -1,3 +1,5 @@
#!/bin/bash
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +16,6 @@
source ../.env
# Check if PASSWORD only contains letters and numbers
if [[ "$PASSWORD" =~ ^[a-zA-Z0-9]+$ ]]
then
@@ -24,15 +25,11 @@ else
exit
fi
echo "your user is:$USER"
echo "your password is:$PASSWORD"
echo "your minio endPoint is:$MINIO_ENDPOINT"
echo "your data dir is $DATA_DIR"
#!/bin/bash
# Specify the config file
config_file='../config/config.yaml'
@@ -57,4 +54,3 @@ sed -i '/minio:/,/endpoint:/s|endpoint: .*|endpoint: '${MINIO_ENDPOINT}'|' $conf
# Replace secret for token
sed -i "s/secret: .*/secret: $PASSWORD/" $config_file