From 1a21b24c5da45259bc2ab1a1b71efbcf3e7c3b16 Mon Sep 17 00:00:00 2001 From: Meliox Date: Thu, 7 Aug 2025 11:39:02 +0200 Subject: [PATCH] check if mod is installed prior to uninstall --- pve-mod-gui-sensors.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index f500f40..b935983 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -270,7 +270,6 @@ function configure { function install_mod { if [[ -n $(cat $NODES_PM_FILE | grep -e "$res->{sensorsOutput}") ]] && [[ -n $(cat $NODES_PM_FILE | grep -e "$res->{systemInfo}") ]]; then err "Mod is already installed. Uninstall existing before installing." - exit fi msg "\nPreparing mod installation..." @@ -921,6 +920,10 @@ Ext.define('PVE.mod.TempHelper', {\n\ # Function to uninstall the modification function uninstall_mod { + if [[ -z $(cat $NODES_PM_FILE | grep -e "$res->{sensorsOutput}") ]] && [[ -z $(cat $NODES_PM_FILE | grep -e "$res->{systemInfo}") ]]; then + err "Mod is not installed." + fi + set_backup_directory msg "\nRestoring modified files..."