diff --git a/script/setup_env.sh b/script/setup_env.sh index 53a764416d34d7a0c1f5c0b4a0b58f68f07312d0..62b221fc445b71d4057fb31177de532be30dff99 100644 --- a/script/setup_env.sh +++ b/script/setup_env.sh @@ -10,7 +10,7 @@ export OS_VERSION="$(echo ${tmp//:/-})" export OBS_UI_IP="172.16.1.81" export OBS_SERVER_IP="172.16.1.95" -export RELEASE_SERVER_IP="172.16.1.241" +export RELEASE_SERVER_IP="172.16.1.29" export RELEASE_SERVER_PORT="30322" if [ -n "${RELEASE_SERVER_PORT}" ];then export SSHPORT="-p ${RELEASE_SERVER_PORT}" diff --git a/script/tools/delete_iso.sh b/script/tools/delete_iso.sh index de73ad91429426a1dea9d18734ee2dc68dbf0338..943affa516db249292b00d3641def34dd97cfaac 100644 --- a/script/tools/delete_iso.sh +++ b/script/tools/delete_iso.sh @@ -1,5 +1,5 @@ #!/bin/bash -# usage: bash delete_iso.sh +# usage: bash delete_iso.sh echo "--------------- start delete older iso ----------------" DIR=$1 my_key=$2 @@ -9,27 +9,25 @@ files=`ssh -i $my_key -o StrictHostKeyChecking=no root@121.36.84.172 "ls $DIR | for file in $files do - echo $file - if [[ $file == openeuler-* ]];then - year=`echo $file | cut -d "-" -f 2` - month=`echo $file | cut -d "-" -f 3` - day=`echo $file | cut -d "-" -f 4` - hour=`echo $file | cut -d "-" -f 5` - if [[ -z $hour ]];then - echo "don't delete $DIR/$file, check next" - continue - fi - file=`echo $file | sed 's/\r//g'` - echo "$file +++++++" - date=`date +%s -d "$year-$month-$day"` - if [ `expr $TODAY - $date` -gt `expr $ISO_DAYS \* 24 \* 3600` ];then - if [[ "x$file" != "x*" ]];then - echo "delete directory $DIR/$file" - ssh -i $my_key -o StrictHostKeyChecking=no root@121.36.84.172 "cd $DIR && rm -rf $file" - fi - else - echo "don't delete $DIR/$file" + echo $file + year=`echo $file | cut -d "-" -f 2` + month=`echo $file | cut -d "-" -f 3` + day=`echo $file | cut -d "-" -f 4` + hour=`echo $file | cut -d "-" -f 5` + if [[ -z $hour ]];then + echo "don't delete $DIR/$file, check next" + continue + fi + file=`echo $file | sed 's/\r//g'` + echo "$file +++++++" + date=`date +%s -d "$year-$month-$day"` + if [ `expr $TODAY - $date` -gt `expr $ISO_DAYS \* 24 \* 3600` ];then + if [[ "x$file" != "x*" ]];then + echo "delete directory $DIR/$file" + ssh -i $my_key -o StrictHostKeyChecking=no root@121.36.84.172 "cd $DIR && rm -rf $file" fi + else + echo "don't delete $DIR/$file" fi done