标签:启动 .gz grep -v work grep gre webapps start profile
#/bin/bash
source /etc/profile
echo ‘start process kill‘
sudo kill -9 $(ps -ef|grep -v grep|grep /mnt/workspace_sf/work/sf-provider|awk ‘{print $2}‘)
sudo kill -9 $(ps -ef|grep -v grep|grep /mnt/tomcat_sf|awk ‘{print $2}‘)
echo ‘finish process kill‘
sleep 5
echo ‘start backup‘
sudo mv /mnt/tomcat_sf/webapps/ROOT /mnt/backup/ROOT-$(date +%Y%m%d-%H%M)
sudo mv /mnt/tomcat_sf/webapps/ROOT.war /mnt/backup/ROOT-$(date +%Y%m%d-%H%M).war
sudo mv /mnt/workspace_sf/ext/sf-provider-2.*.tar.gz /mnt/backup/sf-provider-$(date +%Y%m%d-%H%M).tar.gz
sudo mv /mnt/tomcat_sf/web/dist*.zip /mnt/backup/dist-$(date +%Y%m%d-%H%M).zip
sudo mv /mnt/tomcat_sf/web/html*.zip /mnt/backup/html-$(date +%Y%m%d-%H%M).zip
sudo mv /mnt/tomcat_sf/web/client*.zip /mnt/backup/client$(date +%Y%m%d-%H%M).zip
sudo sleep 5
echo ‘finish backup‘
标签:启动 .gz grep -v work grep gre webapps start profile
原文地址:https://www.cnblogs.com/wang-mengmeng/p/9370878.html