bdy 1.16.4-dev → 1.16.5-stage
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/distTs/package.json
CHANGED
|
@@ -113,6 +113,12 @@ const installService = async (options) => {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
|
+
try {
|
|
117
|
+
await buddy_1.default.markAgentAsInactive(id, host, token);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// do nothing
|
|
121
|
+
}
|
|
116
122
|
output_1.default.exitSuccess(texts_1.TXT_AGENT_INSTALLED);
|
|
117
123
|
}
|
|
118
124
|
};
|
|
@@ -179,6 +185,12 @@ const installApp = async (options) => {
|
|
|
179
185
|
manager_1.default.system.startStandaloneProc();
|
|
180
186
|
}
|
|
181
187
|
else {
|
|
188
|
+
try {
|
|
189
|
+
await buddy_1.default.markAgentAsInactive(id, host, token);
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
// do nothing
|
|
193
|
+
}
|
|
182
194
|
output_1.default.exitSuccess(texts_1.TXT_AGENT_INSTALLED);
|
|
183
195
|
}
|
|
184
196
|
};
|
|
@@ -114,6 +114,12 @@ class ApiBuddyClass {
|
|
|
114
114
|
token,
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
+
async markAgentAsInactive(agentId, host, token) {
|
|
118
|
+
await makeRequest(host, '/tunnel/agent/target/mark-inactive', {
|
|
119
|
+
agentId,
|
|
120
|
+
token
|
|
121
|
+
});
|
|
122
|
+
}
|
|
117
123
|
async addTunnel(agentId, host, token, prepared, sshHostKey) {
|
|
118
124
|
logger_1.default.info(texts_1.LOG_REGISTERING_TUNNEL);
|
|
119
125
|
const config = await makeRequest(host, '/tunnel/add', {
|