diff --git a/packaging/deb/makedeb.sh b/packaging/deb/makedeb.sh index f753668b3b1a83d15c126ae6b0d94c06e97c80aa..f28d98ba9a6fae4390bfa301760aff9583ba4e40 100755 --- a/packaging/deb/makedeb.sh +++ b/packaging/deb/makedeb.sh @@ -45,10 +45,10 @@ mkdir -p ${pkg_dir}${install_home_path}/script cp ${compile_dir}/../packaging/cfg/taos.cfg ${pkg_dir}${install_home_path}/cfg if [ -f "${compile_dir}/test/cfg/taosadapter.toml" ]; then - cp ${compile_dir}/test/cfg/taosadapter.toml ${pkg_dir}${install_home_path}/cfg + cp ${compile_dir}/test/cfg/taosadapter.toml ${pkg_dir}${install_home_path}/cfg || : fi if [ -f "${compile_dir}/test/cfg/taosadapter.service" ]; then - cp ${compile_dir}/test/cfg/taosadapter.service ${pkg_dir}${install_home_path}/cfg ||: + cp ${compile_dir}/test/cfg/taosadapter.service ${pkg_dir}${install_home_path}/cfg || : fi cp ${compile_dir}/../packaging/deb/taosd ${pkg_dir}${install_home_path}/init.d diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index 61fcd3e51982dab6a72245fe0ffb9de5ac51a664..dcd4a83da8929d76aa61d848985b5c4ffe46b9c5 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -757,8 +757,12 @@ function install_service_on_systemd() { } function install_taosadapter_service() { - [ -f ${script_dir}/cfg/taosadapter.service ] &&\ - ${csudo} cp ${script_dir}/cfg/taosadapter.service ${service_config_dir}/ + if ((${service_mod}==0)); then + [ -f ${script_dir}/cfg/taosadapter.service ] &&\ + ${csudo} cp ${script_dir}/cfg/taosadapter.service \ + ${service_config_dir}/ || : + ${csudo} systemctl daemon-reload + fi } function install_service() { diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 8309fa516c4ffdcd9e5a17056304427543dad0a9..c6bc8b9ce00a7fa34f617970f728baf4ee8d234f 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -523,9 +523,8 @@ function install_taosadapter_service() { if ((${service_mod}==0)); then [ -f ${binary_dir}/test/cfg/taosadapter.service ] &&\ ${csudo} cp ${binary_dir}/test/cfg/taosadapter.service\ - ${service_config_dir}/ || : - else - kill_taosadapter + ${service_config_dir}/ || : + ${csudo} systemctl daemon-reload fi } diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 05b49ff6a9599c6050d2ccad778f63d285981420..7ad703be86016bd0c0ce55c80b76bf34914c54bb 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -78,7 +78,13 @@ mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/taos.cfg -[ -f ${cfg_dir}/taosadapter.toml ] && cp ${cfg_dir}/taosadapter.toml ${install_dir}/cfg/taosadapter.toml +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/taosadapter.service" ]; then + cp ${compile_dir}/test/cfg/taosadapter.service ${install_dir}/cfg || : +fi mkdir -p ${install_dir}/bin && cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || : mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/taosd.deb diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh index c3db7e417adb11b92d55464b69c715e3aee2d6bb..2f4b07067fd08ee3a9591f97e7291305307ff498 100755 --- a/packaging/tools/post.sh +++ b/packaging/tools/post.sh @@ -467,7 +467,12 @@ function install_service_on_systemd() { } function install_taosadapter_service() { - [ -f ${cfg_dir}/taosadapter.service ] && ${csudo} cp ${cfg_dir}/taosadapter.service ${service_config_dir} + if ((${service_mod}==0)); then + [ -f ${script_dir}/cfg/taosadapter.service ] &&\ + ${csudo} cp ${script_dir}/cfg/taosadapter.service \ + ${service_config_dir}/ || : + ${csudo} systemctl daemon-reload + fi } function install_service() {