diff --git a/frontend/src/app/app-module/guides/guide-utmstack/guide-utmstack.component.ts b/frontend/src/app/app-module/guides/guide-utmstack/guide-utmstack.component.ts
index e8d312dad..c1d2f9d8d 100644
--- a/frontend/src/app/app-module/guides/guide-utmstack/guide-utmstack.component.ts
+++ b/frontend/src/app/app-module/guides/guide-utmstack/guide-utmstack.component.ts
@@ -65,14 +65,14 @@ export class GuideUtmstackComponent implements OnInit {
this.architectures = [
{
id: 1, name: 'Ubuntu 16/18/20+',
- install: this.getCommandUbuntu('utmstack_agent_service'),
- uninstall: this.getUninstallCommand('utmstack_agent_service'),
+ install: this.getCommandUbuntu('utmstack_collector'),
+ uninstall: this.getUninstallCommandUbuntu('utmstack_collector'),
shell: ''
},
{
- id: 2, name: 'Centos 7/Red Hat Enterprise Linux',
- install: this.getCommandCentos7RedHat('utmstack_agent_service'),
- uninstall: this.getUninstallCommand('utmstack_agent_service'),
+ id: 2, name: 'CentOS 8+/Red Hat Enterprise Linux',
+ install: this.getCommandCentos7RedHat('utmstack_collector'),
+ uninstall: this.getUninstallCommandRedHat('utmstack_collector'),
shell: ''
},
];
@@ -81,29 +81,47 @@ export class GuideUtmstackComponent implements OnInit {
getCommandUbuntu(installerName: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
- return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-collector && \
+ return `sudo bash -c "apt update -y && \
+ apt install wget -y && \
+ mkdir -p /opt/utmstack-collector && \
wget --no-check-certificate -P /opt/utmstack-collector \
https://${ip}:9001/private/dependencies/collector/${installerName} && \
chmod -R 777 /opt/utmstack-collector/${installerName} && \
/opt/utmstack-collector/${installerName} install ${ip} ${this.token} yes"`;
}
+
getCommandCentos7RedHat(installerName: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
- return `sudo bash -c "yum install wget -y && mkdir -p /opt/utmstack-collector && \
+ return `sudo bash -c "dnf update -y && \
+ dnf install wget -y && \
+ mkdir -p /opt/utmstack-collector && \
wget --no-check-certificate -P /opt/utmstack-collector \
https://${ip}:9001/private/dependencies/collector/${installerName} && \
chmod -R 777 /opt/utmstack-collector/${installerName} && \
/opt/utmstack-collector/${installerName} install ${ip} ${this.token} yes"`;
}
- getUninstallCommand(installerName: string): string {
- return `sudo bash -c "/opt/utmstack-collector/${installerName} uninstall || true; \
- systemctl stop UTMStackCollector 2>/dev/null || true; systemctl disable UTMStackCollector 2>/dev/null || true; \
- rm -f /etc/systemd/system/UTMStackCollector.service 2>/dev/null || true; \
- systemctl daemon-reload 2>/dev/null || true; \
- echo 'Removing UTMStack Collector dependencies...' && sleep 10 && rm -rf /opt/utmstack-collector 2>/dev/null || true; \
- echo 'UTMStack Collector dependencies removed successfully.'"`;
+ getUninstallCommandUbuntu(installerName: string): string {
+ return `sudo bash -c "/opt/utmstack-collector/${installerName} uninstall && \
+ (systemctl stop UTMStackCollector 2>/dev/null || service UTMStackCollector stop 2>/dev/null || true) && \
+ (systemctl disable UTMStackCollector 2>/dev/null || chkconfig UTMStackCollector off 2>/dev/null || true) && \
+ rm -rf /opt/utmstack-collector && \
+ rm -f /etc/systemd/system/UTMStackCollector.service && \
+ rm -f /etc/init.d/UTMStackCollector && \
+ (systemctl daemon-reload 2>/dev/null || true) && \
+ echo 'UTMStack Collector uninstalled successfully'"`;
+ }
+
+
+ getUninstallCommandRedHat(installerName: string): string {
+ return `sudo bash -c "/opt/utmstack-collector/${installerName} uninstall && \
+ (systemctl stop UTMStackCollector 2>/dev/null || true) && \
+ (systemctl disable UTMStackCollector 2>/dev/null || true) && \
+ rm -rf /opt/utmstack-collector && \
+ rm -f /etc/systemd/system/UTMStackCollector.service && \
+ systemctl daemon-reload && \
+ echo 'UTMStack Collector uninstalled successfully'"`;
}
}