篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 脚本部署del motore su negozio e casse相关的知识,希望对你有一定的参考价值。
#!/bin/bash
print_title(){
echo
echo "##"
echo "## $(date) -- $1"
echo "##"
echo
}
patch_name="patch_engine-55207"
copy_and_untar(){
local pos="c$1"
print_title "Copy and untar on $pos.."
scp /tmp/${patch_name}/${patch_name}_pos.tgz orka@$pos:/tmp/
ssh orka@$pos "tar -xvf /tmp/${patch_name}_pos.tgz -C /home/orka/Appli"
}
print_title "Deploy on sorkaisse"
tar -xvf /tmp/${patch_name}/${patch_name}_pos.tgz -C /home/orka/Appli
sudo systemctl restart orkad.service
print_title "Start deploying on POS"
for pos in $(orkpsql -h sorkaisse-db -d orkaisse -tc "select max(idc) from p_cai where idc not in (99,95) group by idc order by idc;"); do
copy_and_untar $pos;
done
以上是关于sh 脚本部署del motore su negozio e casse的主要内容,如果未能解决你的问题,请参考以下文章