update script
This commit is contained in:
parent
02dab0f3f2
commit
f0e32c5b6b
|
@ -379,8 +379,8 @@ function add_newHostname_to_hosts() {
|
|||
}
|
||||
|
||||
function set_hostname() {
|
||||
echo -e -n "${GREEN}Host name or IP (assigned to this machine) which can be accessed by your tools or apps: (must not be 'localhost') :${NC}"
|
||||
read -e -p "" -i "$(hostname)" newHostname
|
||||
echo -e -n "${GREEN}Host name or IP (assigned to this machine) which can be accessed by your tools or apps (must not be 'localhost')${NC}"
|
||||
read -e -p " : " -i "$(hostname)" newHostname
|
||||
while true; do
|
||||
if [ -z "$newHostname" ]; then
|
||||
newHostname=$(hostname)
|
||||
|
@ -388,8 +388,8 @@ function set_hostname() {
|
|||
elif [ "$newHostname" != "localhost" ]; then
|
||||
break
|
||||
else
|
||||
echo -e -n "${GREEN}Host name or IP (assigned to this machine) which can be accessed by your tools or apps: (must not be 'localhost') :${NC}"
|
||||
read -e -p "" -i "$(hostname)" newHostname
|
||||
echo -e -n "${GREEN}Host name or IP (assigned to this machine) which can be accessed by your tools or apps (must not be 'localhost')${NC}"
|
||||
read -e -p " : " -i "$(hostname)" newHostname
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -525,12 +525,14 @@ function install_config() {
|
|||
if [ -f ${script_dir}/cfg/${configFile2} ]; then
|
||||
${csudo} echo "monitor 1" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo} echo "monitorFQDN ${serverFqdn}" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo} echo "audit 1" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo}cp ${script_dir}/cfg/${configFile2} ${cfg_install_dir}
|
||||
fi
|
||||
${csudo}chmod 644 ${cfg_install_dir}/*
|
||||
else
|
||||
${csudo} echo "monitor 1" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo} echo "monitorFQDN ${serverFqdn}" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo} echo "audit 1" >> ${script_dir}/cfg/${configFile2}
|
||||
${csudo}cp -f ${script_dir}/cfg/${configFile2} ${cfg_install_dir}/${configFile2}.new
|
||||
fi
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ release_dir="${top_dir}/release"
|
|||
|
||||
#package_name='linux'
|
||||
if [ "$verMode" == "cluster" ]; then
|
||||
install_dir="${release_dir}/${productName2}-enterprise-server-${version}"
|
||||
install_dir="${release_dir}/${productName2}-enterprise-${version}"
|
||||
elif [ "$verMode" == "cloud" ]; then
|
||||
install_dir="${release_dir}/${productName2}-cloud-server-${version}"
|
||||
else
|
||||
|
|
|
@ -283,12 +283,16 @@ function remove_data_and_config() {
|
|||
}
|
||||
|
||||
function uninstall_taosx() {
|
||||
if [ -f /usr/local/taosx/uninstall.sh ]; then
|
||||
cd /usr/local/taosx
|
||||
if [ -f ${installDir}/uninstall.sh ]; then
|
||||
cd ${installDir}
|
||||
bash uninstall.sh
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$verMode" == "cluster" ]; then
|
||||
uninstall_taosx
|
||||
fi
|
||||
|
||||
# Stop service and disable booting start.
|
||||
clean_service
|
||||
# Remove binary file and links
|
||||
|
@ -399,11 +403,6 @@ if [ X$answer == X"y" ] || [ X$answer == X"Y" ]; then
|
|||
remove_data_and_config
|
||||
fi
|
||||
|
||||
|
||||
if [ "$verMode" == "cluster" ]; then
|
||||
uninstall_taosx
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "${productName2} is removed successfully!"
|
||||
echo
|
Loading…
Reference in New Issue