diff --git a/backUpDB.sh b/backUpDB.sh index 3a3de2c..c49be41 100755 --- a/backUpDB.sh +++ b/backUpDB.sh @@ -24,4 +24,4 @@ mv ${dbName}.sql sql tar -czvf ${dbName}.sql.tar.gz sql echo "ossPath: "${ossPath} -~/ossutil cp ${dbName}.sql.tar.gz oss://${ossPath}/ -f +ossutil cp ${dbName}.sql.tar.gz oss://${ossPath}/ -f diff --git a/checkService.sh b/checkService.sh index 7b27e10..d1024c7 100755 --- a/checkService.sh +++ b/checkService.sh @@ -28,7 +28,7 @@ function uploadLog() echo "current user is ${USER}" echo "current log is " ${workPath}/${identify}.log journalctl -n $count -xe -${ctype} $identify | grep -wv " at " > ${workPath}/${identify}.log - ~/ossutil cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log + cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/chmodAllsh.sh b/chmodAllsh.sh deleted file mode 100644 index 298737d..0000000 --- a/chmodAllsh.sh +++ /dev/null @@ -1 +0,0 @@ -chmod +x *.sh diff --git a/dbUpgrade.sh b/dbUpgrade.sh index fd6cde3..cc39b2c 100755 --- a/dbUpgrade.sh +++ b/dbUpgrade.sh @@ -51,7 +51,7 @@ function replaceAndExec(){ rm sqlOut.log cp $tempPath/$sqlFile . /usr/bin/mysql -u${dbUser} -p${dbPassword} -P${dbPort} -e "$(cat ${sqlFile})" | tee sqlOut.log - ~/ossutil cp -f sqlOut.log oss://${ossPath}/${dbHost}/sqlOut.log + cp -f sqlOut.log oss://${ossPath}/${dbHost}/sqlOut.log } function uploadLog() { @@ -60,7 +60,7 @@ function uploadLog() count=$3 echo "current user is ${USER}" journalctl -n $count -xe -${ctype} $identify > ${tempPath}/${identify}.log - ~/ossutil cp -f ${tempPath}/${identify}.log oss://${ossPath}/${dbHost}/${identify}.log + cp -f ${tempPath}/${identify}.log oss://${ossPath}/${dbHost}/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/frontEndUpgrade.sh b/frontEndUpgrade.sh index 589ae68..16a130b 100755 --- a/frontEndUpgrade.sh +++ b/frontEndUpgrade.sh @@ -28,7 +28,7 @@ function uploadLog() count=$3 echo "current user is ${USER}" journalctl -n $count -xe -${ctype} $identify > ${workPath}/${identify}.log - ~/ossutil cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log + cp -f ${workPath}/${identify}.log oss://${ossLogPath}/logs/${identify}.log if [ $? -eq 0 ]; then echo "ok: log ${identify} uploaded to oss!" return 0 diff --git a/ossDetect.sh b/ossDetect.sh index 43aaf83..bdc6c88 100755 --- a/ossDetect.sh +++ b/ossDetect.sh @@ -1,7 +1,7 @@ #!/bin/bash cd /tmp/autoDeploy -./ossutil stat oss://ztupload/html.zip > html_oss.info +ossutil stat oss://ztupload/html.zip > html_oss.info ossInfo=$(cat html_oss.info) out1=${ossInfo##*Etag} echo $out1 diff --git a/ossUpgrade.sh b/ossUpgrade.sh index 90703db..ea333f2 100755 --- a/ossUpgrade.sh +++ b/ossUpgrade.sh @@ -20,7 +20,7 @@ function compare(){ if [ ! -f ${projectName}_oss.info ]; then touch ${projectName}_oss.info fi - (~/ossutil stat oss://${ossPath}$fileName | head -n -2) > ${projectName}_upstream_oss.info + ( stat oss://${ossPath}$fileName | head -n -2) > ${projectName}_upstream_oss.info upstreamOssInfoMd5=$(md5sum ${projectName}_upstream_oss.info) upstreamOssInfoMd5="${upstreamOssInfoMd5% *}" locOssInfoMd5=$(md5sum ${projectName}_oss.info) @@ -41,10 +41,10 @@ function compare(){ function downloadFromOss(){ cd $basePath echo "fileName: " $fileName - ~/ossutil cp oss://${ossPath}${fileName} ${fileName}_tmp + cp oss://${ossPath}${fileName} ${fileName}_tmp rm $fileName mv ${fileName}_tmp $fileName - (~/ossutil stat oss://${ossPath}$fileName | head -n -2) > ${projectName}_oss.info + ( stat oss://${ossPath}$fileName | head -n -2) > ${projectName}_oss.info } function main(){ diff --git a/uplaodLog.sh b/uplaodLog.sh index 89e862c..1a6aaaf 100755 --- a/uplaodLog.sh +++ b/uplaodLog.sh @@ -6,4 +6,4 @@ ossPath=$1 #末尾别忘了加/ serviceName=$2 sudo journalctl -n 2000 -xeu $serviceName > ${serviceName}.log -./ossutil cp ${serviceName}.log > oss://${ossPath} +ossutil cp ${serviceName}.log > oss://${ossPath} diff --git a/upload.sh b/upload.sh index 4a348f6..c049932 100755 --- a/upload.sh +++ b/upload.sh @@ -6,7 +6,7 @@ function fetch() if [ -f "$file" ] then fileName=${file##*/} - ~/ossutil cp -f $file oss://ztupload/stage/dataCenter/backEnd/$fileName & + cp -f $file oss://ztupload/stage/dataCenter/backEnd/$fileName & echo file: $fileName fi done