From 8aa082c9dff51a7a58bb1b11a44e98578b481821 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Thu, 22 Feb 2024 21:17:05 +0000 Subject: [PATCH] exit restore if existing install --- restore.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/restore.sh b/restore.sh index 375ef8de..2722cbc7 100755 --- a/restore.sh +++ b/restore.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="56" +SCRIPT_VERSION="57" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh' sudo apt update @@ -29,6 +29,11 @@ fi rm -f $TMP_FILE +if [ -d /rmm/api/tacticalrmm ]; then + echo -ne "${RED}ERROR: Existing trmm installation found. The restore script must be run on a clean server, please re-read the docs.${NC}\n" + exit 1 +fi + arch=$(uname -m) if [[ "$arch" != "x86_64" ]] && [[ "$arch" != "aarch64" ]]; then echo -ne "${RED}ERROR: Only x86_64 and aarch64 is supported, not ${arch}${NC}\n"