提交 29a2e34c 编写于 作者: Z zyyang

change

上级 014948c8
......@@ -64,15 +64,15 @@ if [ "$pagMode" == "lite" ]; then
taostools_bin_files=""
else
wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${build_dir}/bin/TDinsight.sh \
&& echo "TDinsight.sh downloaded!" \
|| echo "failed to download TDinsight.sh"
wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${build_dir}/bin/TDinsight.sh &&
echo "TDinsight.sh downloaded!" ||
echo "failed to download TDinsight.sh"
taostools_bin_files=" ${build_dir}/bin/${dumpName} \
${build_dir}/bin/${benchmarkName} \
${build_dir}/bin/TDinsight.sh "
#!!! do not change taosadapter here
#!!! do not change taosadapter here
bin_files="${build_dir}/bin/${serverName} \
${build_dir}/bin/${clientName} \
${taostools_bin_files} \
......@@ -107,12 +107,13 @@ mkdir -p ${install_dir}
mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc
mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/${configFile} ${install_dir}/cfg/${configFile}
if [ -f "${compile_dir}/test/cfg/${adapterName}.toml" ]; then
cp ${compile_dir}/test/cfg/${adapterName}.toml ${install_dir}/cfg || :
# !!! do not change the taosadapter here!!!
if [ -f "${compile_dir}/test/cfg/taosadapter.toml" ]; then
cp ${compile_dir}/test/cfg/taosadapter.toml ${install_dir}/cfg || :
fi
if [ -f "${compile_dir}/test/cfg/${adapterName}.service" ]; then
cp ${compile_dir}/test/cfg/${adapterName}.service ${install_dir}/cfg || :
# !!! do not change the taosadapter here!!!
if [ -f "${compile_dir}/test/cfg/taosadapter.service" ]; then
cp ${compile_dir}/test/cfg/taosadapter.service ${install_dir}/cfg || :
fi
if [ -f "${cfg_dir}/${serverName}.service" ]; then
......@@ -133,16 +134,18 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${se
mkdir -p ${install_dir}/init.d && cp ${init_file_tarbitrator_deb} ${install_dir}/init.d/tarbitratord.deb || :
mkdir -p ${install_dir}/init.d && cp ${init_file_tarbitrator_rpm} ${install_dir}/init.d/tarbitratord.rpm || :
if [ $adapterName != "${adapterName}" ]; then
mv ${install_dir}/cfg/${adapterName}.toml ${install_dir}/cfg/$adapterName.toml
# !!! do not change taosadaptor here
if [ $adapterName != "taosadapter" ]; then
# !!! do not change taosadaptor here
mv ${install_dir}/cfg/taosadapter.toml ${install_dir}/cfg/$adapterName.toml
sed -i "s/path = \"\/var\/log\/taos\"/path = \"\/var\/log\/${productName}\"/g" ${install_dir}/cfg/$adapterName.toml
sed -i "s/password = \"taosdata\"/password = \"${defaultPasswd}\"/g" ${install_dir}/cfg/$adapterName.toml
mv ${install_dir}/cfg/${adapterName}.service ${install_dir}/cfg/$adapterName.service
# !!! do not change taosadaptor here
mv ${install_dir}/cfg/taosadapter.service ${install_dir}/cfg/$adapterName.service
sed -i "s/TDengine/${productName}/g" ${install_dir}/cfg/$adapterName.service
sed -i "s/taosAdapter/${adapterName}/g" ${install_dir}/cfg/$adapterName.service
sed -i "s/taosadapter/${adapterName}/g" ${install_dir}/cfg/$adapterName.service
# !!! do not change taosadaptor here
mv ${install_dir}/bin/taosadapter ${install_dir}/bin/${adapterName}
mv ${install_dir}/bin/run_taosd_and_taosadapter.sh ${install_dir}/bin/run_${serverName}_and_${adapterName}.sh
mv ${install_dir}/bin/taosd-dump-cfg.gdb ${install_dir}/bin/${serverName}-dump-cfg.gdb
......@@ -150,24 +153,24 @@ fi
if [ -n "${taostools_bin_files}" ]; then
mkdir -p ${taostools_install_dir} || echo -e "failed to create ${taostools_install_dir}"
mkdir -p ${taostools_install_dir}/bin \
&& cp ${taostools_bin_files} ${taostools_install_dir}/bin \
&& chmod a+x ${taostools_install_dir}/bin/* || :
mkdir -p ${taostools_install_dir}/bin &&
cp ${taostools_bin_files} ${taostools_install_dir}/bin &&
chmod a+x ${taostools_install_dir}/bin/* || :
if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh ]; then
cp ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh \
${taostools_install_dir}/ > /dev/null \
&& chmod a+x ${taostools_install_dir}/install-${toolsName}.sh \
|| echo -e "failed to copy install-${toolsName}.sh"
${taostools_install_dir}/ >/dev/null &&
chmod a+x ${taostools_install_dir}/install-${toolsName}.sh ||
echo -e "failed to copy install-${toolsName}.sh"
else
echo -e "install-${toolsName}.sh not found"
fi
if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh ]; then
cp ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh \
${taostools_install_dir}/ > /dev/null \
&& chmod a+x ${taostools_install_dir}/uninstall-${toolsName}.sh \
|| echo -e "failed to copy uninstall-${toolsName}.sh"
${taostools_install_dir}/ >/dev/null &&
chmod a+x ${taostools_install_dir}/uninstall-${toolsName}.sh ||
echo -e "failed to copy uninstall-${toolsName}.sh"
else
echo -e "uninstall-${toolsName}.sh not found"
fi
......@@ -344,7 +347,7 @@ if [ "$exitcode" != "0" ]; then
fi
if [ -n "${taostools_bin_files}" ]; then
wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!"|| echo "failed to download TDinsight.sh"
wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!" || echo "failed to download TDinsight.sh"
tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || :
exitcode=$?
if [ "$exitcode" != "0" ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册