Add secure automatic agent updates
This commit is contained in:
16
scripts/uninstall-agent.sh
Executable file
16
scripts/uninstall-agent.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Запустите удаление от root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
systemctl disable --now proxmox-dashboard-agent.service 2>/dev/null || true
|
||||
rm -f /etc/systemd/system/proxmox-dashboard-agent.service
|
||||
rm -f /etc/proxmox-dashboard-agent.env
|
||||
rm -f /usr/local/bin/proxmox-dashboard-agent
|
||||
rm -rf /var/lib/proxmox-dashboard-agent
|
||||
systemctl daemon-reload
|
||||
systemctl reset-failed proxmox-dashboard-agent.service 2>/dev/null || true
|
||||
echo "Агент и его локальные учётные данные удалены."
|
||||
Reference in New Issue
Block a user