From 80fc8b40cd1623bce4fe27ca073af6bb336830f7 Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Sun, 3 Nov 2024 03:25:59 +0100 Subject: [PATCH] Remove postinstall flagged file when removing app --- internal/edgeapps/edgeapps.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/edgeapps/edgeapps.go b/internal/edgeapps/edgeapps.go index 05650bf..bd98be7 100644 --- a/internal/edgeapps/edgeapps.go +++ b/internal/edgeapps/edgeapps.go @@ -71,6 +71,7 @@ const optionsEnvFilename = "/edgeapp.env" const authEnvFilename = "/auth.env" const runnableFilename = "/.run" const appdataFoldername = "/appdata" +const postInstallFilename = "/edgebox-postinstall.done" const myEdgeAppServiceEnvFilename = "/myedgeapp.env" const defaultContainerOperationSleepTime time.Duration = time.Second * 10 @@ -384,6 +385,12 @@ func SetEdgeAppNotInstalled(ID string) bool { log.Println(err) } + err = os.Remove(utils.GetPath(utils.EdgeAppsPath) + ID + postInstallFilename) + if err != nil { + result = false + log.Println(err) + } + buildFrameworkContainers() return result