文件:info.sh start.sh stop.sh
為明溪等地區(qū)用戶提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及明溪網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作、明溪網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
路徑 $HOME/ggscript/ggoperat
因?yàn)榫帉懥颂嗄_本后有時(shí)候?yàn)榱瞬榭碠GG運(yùn)行狀態(tài)不得不頻繁的在GGSCI和系統(tǒng)界面切換,所以為了便捷自己寫了幾個(gè)比較簡(jiǎn)單的腳本,配合alias別名,模擬ggsci內(nèi)的info start stop功能。同時(shí)這幾個(gè)腳本也可以被其他腳本調(diào)用用于操作或者獲取進(jìn)程狀態(tài)
info.sh
#!/bin/bash if [ $# -eq 0 ]; then echo "INFO EXTRACT" exit 2 fi echo $dir cd $HOME/ggscript/ggoperat dir=$PWD cd $HOME if [ -f .profile ];then . .profile fi if [ -f .bash_profile ];then . .bash_profile fi cd $dir backuptime=`date +%Y%m%d-%H%M%S` val=$1 val=`echo $val|tr a-z A-Z` if [ `echo $val|grep ^E` ];then IType=EXTRACT elif [ `echo $val|grep ^P` ];then IType=POST elif [ `echo $val|grep ^R` ];then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2 fi pro=`echo $val.PRM|tr A-Z a-z` cd $HOME/ggserver/dirprm if [ ! -e $pro ]; then echo "the PROCESS is not exist" exit 2 fi #cd $HOME/ggscript/ggoperat cd $HOME/ggserver (echo INFO $val;echo exit)|./ggsci
start.sh
#!/bin/bash if [ $# -eq 0 ]; then echo "START EXTRACT" exit 2 fi echo $dir cd $HOME/ggscript/ggoperat dir=$PWD cd $HOME if [ -f .profile ];then . .profile fi if [ -f .bash_profile ];then . .bash_profile fi cd $dir backuptime=`date +%Y%m%d-%H%M%S` val=$1 val=`echo $val|tr a-z A-Z` if [ `echo $val|grep ^E` ];then IType=EXTRACT elif [ `echo $val|grep ^P` ];then IType=POST elif [ `echo $val|grep ^R` ];then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2 fi pro=`echo $val.PRM|tr A-Z a-z` cd $HOME/ggserver/dirprm if [ ! -e $pro ]; then echo "the PROCESS is not exist" exit 2 fi #cd $HOME/ggscript/ggoperat cd $HOME/ggserver (echo START $val;echo exit)|./ggsci
stop.sh
#!/bin/bash if [ $# -eq 0 ]; then echo "STOP EXTRACT" exit 2 fi echo $dir cd $HOME/ggscript/ggoperat dir=$PWD cd $HOME if [ -f .profile ];then . .profile fi if [ -f .bash_profile ];then . .bash_profile fi cd $dir backuptime=`date +%Y%m%d-%H%M%S` val=$1 val=`echo $val|tr a-z A-Z` if [ `echo $val|grep ^E` ];then IType=EXTRACT elif [ `echo $val|grep ^P` ];then IType=POST elif [ `echo $val|grep ^R` ];then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2 fi pro=`echo $val.PRM|tr A-Z a-z` cd $HOME/ggserver/dirprm if [ ! -e $pro ]; then echo "the PROCESS is not exist" exit 2 fi #cd $HOME/ggscript/ggoperat cd $HOME/ggserver (echo STOP $val;echo exit)|./ggsci
網(wǎng)站名稱:OGG運(yùn)維優(yōu)化腳本(十九)-進(jìn)程操作類--輔助操作
當(dāng)前網(wǎng)址:http://jinyejixie.com/article2/pshgoc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)、品牌網(wǎng)站設(shè)計(jì)、商城網(wǎng)站、面包屑導(dǎo)航、外貿(mào)建站、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)