Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add inject data script for pt redis #910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion redis/package/redis-keeper-package/src/main/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ function getRole(){
fi
echo `toUpper $ENV`
}
function getType(){
TYPE=NORMAL
if [ -f /opt/settings/server.properties ];then
ENV=`cat /opt/settings/server.properties | egrep -i "^type" | awk -F= '{print $2}'`
fi
echo `toUpper $ENV`
}
function tryRemoveJarLog() {
logdir=$1
appname=$2
Expand Down Expand Up @@ -157,10 +164,14 @@ else
CURRENT_SCRIPT_PATH="$DIR/../current/scripts"

find $CURRENT_SCRIPT_PATH -name "*.sh" | xargs chmod 755
TYPE=`getType`
if [ $TYPE = "LARGE" ];then
sed -i 's/^maxmemory.*$/maxmemory 10gb/' $CURRENT_SCRIPT_PATH/redis/template/master.conf
sed -i '21,22s/^/#/' $CURRENT_SCRIPT_PATH/redis/start.sh
fi
$CURRENT_SCRIPT_PATH/start_all.sh active
fi

IDC=`getIdc`
total=`getTotalMem`
if ([ $IDC = "PTJQ" ] || [ $IDC = "PTOY" ]) && ([ "$total" -gt 60 ]);then
#MB
Expand Down
Loading