sh 重置orkave

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 重置orkave相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# DA ESEGUIRE SU ORKCENTRAL

#sudo supervisorctl stop orkave
#orkpsql -U orka -h sorkcentral-db -d orkcentral -t -c "delete from i_trs; delete from i_trs_pull"
mkdir -p /tmp/reset_orkave

#shops=$(orkpsql -U orka -h sorkcentral-db -d orkcentral -t -c "select ip from b_mag where ip!='' order by idmag");
shops=$(orkpsql -U orka -h sorkcentral-db -d orkcentral -t -c "select ip from b_mag where ip!='' order by idmag");
for shop in $shops; do
        echo $shop

        scp -o ConnectTimeout=2 /tmp/reset_orkave/orkave.sh $shop:/tmp
        ssh $shop -o ConnectTimeout=3 "sudo supervisorctl stop orkave  ; /tmp/orkave.sh ; sudo supervisorctl start orkave" &> "/tmp/reset_orkave/$shop" &
    done  <<< "$shops"


#echo "start orkcentral orkave"
#sudo supervisorctl start orkave
#!/bin/bash

# ESEGUITO AUTOMATICAMENTE SU ORKAVE

#sudo supervisorctl stop orkave
orkpsql -U orka -h sorkaisse-db -d orkaisse -t -c "delete from i_trs; delete from i_trs_pull;"

pos=$(orkpsql -U orka -h sorkaisse-db -d orkaisse -t -c "select idc from p_cai where idc not in (95, 99) order by idc")
for i in $pos; do
        echo c$i

            ssh c$i "sudo supervisorctl stop orkave"
            orkpsql -U orka -h c$i -d orktpv -t -c "delete from i_trs; delete from i_trs_pull;"
            ssh c$i "sudo supervisorctl start orkave"
done <<< "$pos"

#sudo supervisorctl start orkave

以上是关于sh 重置orkave的主要内容,如果未能解决你的问题,请参考以下文章

sh 重置未推送提交

sh 在推送之前重置qa5

sh git重置

sh 将当前分支重置为远程状态

sh 重置一个文件

sh Git重置本地提交