check if mod is installed prior to uninstall

This commit is contained in:
Meliox 2025-08-07 11:39:02 +02:00
parent 23d40c697a
commit 1a21b24c5d

View File

@ -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..."