Commit cdbd1cbb authored by 智勇's avatar 智勇

nodejs

parent 7ff9636a
#!/bin/sh
echo "start run nodejs"
package_path="/home/quant_group/project"
echo "NAMESPACE is $NAMESPACE"
echo "cd ${package_path}"
cd ${package_path}
echo "echo host"
echo 192.168.6.13 eos.quantgroups.com >> /etc/hosts
echo 192.168.4.117 apollo-dev.quantgroups.com >> /etc/hosts
echo 172.20.3.11 sentry.quantgroups.com >> /etc/hosts
echo "tar zxf dist.tgz -C ${package_path}"
tar zxf ${package_path}/dist.tgz -C ${package_path}/
echo "sed domain.com to liangkebang.com"
find ${package_path}/ -type f -name "*.js" | xargs sed -i "s#\.domain\.com#-$NAMESPACE.liangkebang.com#g"
echo "sed xyqb.com to liangkebang.com"
find ${package_path}/ -name "*.js" | xargs sed -i "s#\.xyqb\.com#-$NAMESPACE.liangkebang.com#g"
echo "sed q-gp.com to liangkebang.com"
find ${package_path}/ -name "*.js" | xargs sed -i "s#\.q-gp.\com#-$NAMESPACE.liangkebang.com#g"
echo "rm -rf dist.tgz public/dist "
rm -rf ${package_path}/dist.tgz
echo "start cmd from 172.30.220.22:3003"
curl -s "http://172.30.220.22:3003/proconfig/get_info?system_name=${SYSTEM_NAME}&key=start_command" | sh
echo "sleep 3"
sleep 3
if ls ./*log 1> /dev/null 2>&1; then
echo "ls -l ./logs"
ls -l ./logs
else
echo "files do not exist"
touch ./logs/tmp.log
fi
echo done!!!
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment