replace osutil path
This commit is contained in:
parent
39a59a0ec8
commit
553e030ccd
@ -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
|
||||
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
chmod +x *.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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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(){
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user