update install agent shell
This commit is contained in:
parent
fa3137bf83
commit
c79078b2df
|
@ -192,7 +192,7 @@ function install_binary() {
|
||||||
unzip -q "${program_name}-${version}-${file_ext}" -d "$install_dir"
|
unzip -q "${program_name}-${version}-${file_ext}" -d "$install_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "${install_dir}" && rm -rf "${tmp_dir}"
|
cd "${install_dir}" && rm -rf "${tmp_dir}" && echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_certs() {
|
function install_certs() {
|
||||||
|
@ -201,12 +201,14 @@ function install_certs() {
|
||||||
client_key="{{client_key}}"
|
client_key="{{client_key}}"
|
||||||
|
|
||||||
mkdir -p ${install_dir}/config
|
mkdir -p ${install_dir}/config
|
||||||
|
echo "[agent] waiting generate certs"
|
||||||
echo -e "${ca_crt}" > ${install_dir}/config/ca.crt
|
echo -e "${ca_crt}" > ${install_dir}/config/ca.crt
|
||||||
echo -e "${client_crt}" > ${install_dir}/config/client.crt
|
echo -e "${client_crt}" > ${install_dir}/config/client.crt
|
||||||
echo -e "${client_key}" > ${install_dir}/config/client.key
|
echo -e "${client_key}" > ${install_dir}/config/client.key
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_config() {
|
function install_config() {
|
||||||
|
echo "[agent] waiting generate config"
|
||||||
port={{port}}
|
port={{port}}
|
||||||
cat <<EOF > ${install_dir}/agent.yml
|
cat <<EOF > ${install_dir}/agent.yml
|
||||||
configs.auto_reload: true
|
configs.auto_reload: true
|
||||||
|
@ -284,7 +286,7 @@ function main() {
|
||||||
if [[ -z "${version}" ]]; then
|
if [[ -z "${version}" ]]; then
|
||||||
echo "Error: Could not obtain the latest version number. Please check the network and try again.">&2; exit 1;
|
echo "Error: Could not obtain the latest version number. Please check the network and try again.">&2; exit 1;
|
||||||
else
|
else
|
||||||
echo "Name: [${program_name}], Version: [${version}], Path: [${install_dir}]]"
|
echo "Name: [${program_name}], Version: [${version}], Path: [${install_dir}]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_dir
|
check_dir
|
||||||
|
|
Loading…
Reference in New Issue