You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: installer/linux/agent-upgrade-session-user.sh
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,10 @@ else
70
70
# Uninstall the old named agent *openbas* and install the new named agent *openaev* if the folder openaev doesn't exist
71
71
log "01. Installing OpenAEV Agent..."
72
72
openaev_session=$(printf %s "${session_name}"| sed 's/openbas/openaev/g')
73
-
run curl -sSfLG ${base_url}/api/tenants/${tenant_id}/agent/installer/openaev/${os}/session-user/${OPENAEV_TOKEN} --data-urlencode "installationDir=${openaev_dir}" --data-urlencode "serviceName=${openaev_session}"| sh
73
+
tmp_installer="$(mktemp)"|| die "mktemp failed"
74
+
run curl -sSfLG ${base_url}/api/tenants/${tenant_id}/agent/installer/openaev/${os}/session-user/${OPENAEV_TOKEN} --data-urlencode "installationDir=${openaev_dir}" --data-urlencode "serviceName=${openaev_session}" -o "$tmp_installer"
75
+
run sh "$tmp_installer"
76
+
rm -f "$tmp_installer"
74
77
75
78
log "02. Uninstalling OpenBAS Agent..."
76
79
uninstall_dir=$(printf %s "${install_dir}"| sed 's/openaev/openbas/g')
Copy file name to clipboardExpand all lines: installer/linux/agent-upgrade.sh
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,14 @@ else
60
60
# Uninstall the old named agent *openbas* and install the new named agent *openaev* if the folder openaev doesn't exist
61
61
log "01. Installing OpenAEV Agent..."
62
62
openaev_service=$(printf %s "${service_name}"| sed 's/openbas/openaev/g')
63
-
run curl -sSfLG ${base_url}/api/tenants/${tenant_id}/agent/installer/openaev/${os}/service/${OPENAEV_TOKEN} --data-urlencode "installationDir=${openaev_dir}" --data-urlencode "serviceName=${openaev_service}"| sh
63
+
tmp_installer="$(mktemp)"|| die "mktemp failed"
64
+
run curl -sSfLG ${base_url}/api/tenants/${tenant_id}/agent/installer/openaev/${os}/service/${OPENAEV_TOKEN} --data-urlencode "installationDir=${openaev_dir}" --data-urlencode "serviceName=${openaev_service}" -o "$tmp_installer"
65
+
run sh "$tmp_installer"
66
+
rm -f "$tmp_installer"
64
67
65
68
log "02. Uninstalling OpenBAS Agent..."
66
-
run uninstall_dir=$(printf %s "${install_dir}"| sed 's/openaev/openbas/g')
67
-
run uninstall_service=$(printf %s "${service_name}"| sed 's/openaev/openbas/g')
69
+
uninstall_dir=$(printf %s "${install_dir}"| sed 's/openaev/openbas/g')
70
+
uninstall_service=$(printf %s "${service_name}"| sed 's/openaev/openbas/g')
68
71
run rm -f ${uninstall_dir}/openbas_agent_kill.sh
69
72
run rm -f ${uninstall_dir}/openbas-agent-config.toml
0 commit comments