diff --git a/frontend/src/pages/Server.tsx b/frontend/src/pages/Server.tsx
index daa70fa..5a8cd17 100644
--- a/frontend/src/pages/Server.tsx
+++ b/frontend/src/pages/Server.tsx
@@ -155,7 +155,7 @@ export const Server = ({id, className}: Props) => {
- {setUpdaterModalOpen(false);}}>
+ setUpdaterModalOpen(false)}>
setForceStopModalOpen(false)}>
diff --git a/go.mod b/go.mod
index 94e8409..a61c90f 100644
--- a/go.mod
+++ b/go.mod
@@ -4,9 +4,9 @@ go 1.18
require (
github.com/adrg/xdg v0.4.0
+ github.com/gorcon/rcon v1.3.4
github.com/hashicorp/go-version v1.6.0
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
- github.com/gorcon/rcon v1.3.4
github.com/jensvandewiel/gosteamcmd v0.1.2
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/sethvargo/go-password v0.2.0
diff --git a/installer/helpers.go b/installer/helpers.go
index d8633cb..1e19366 100644
--- a/installer/helpers.go
+++ b/installer/helpers.go
@@ -3,6 +3,7 @@ package installer
import (
_ "embed"
"fmt"
+ "github.com/adrg/xdg"
"os"
"path"
)
@@ -12,12 +13,12 @@ var steamExe []byte
func (c *InstallerController) setupSteamCMD() error {
- exePath, err := os.Executable()
+ localPath, err := xdg.ConfigFile("ArkAscendedServerManager")
if err != nil {
- return fmt.Errorf("failed to get executable directory: %v", err)
+ return fmt.Errorf("failed to get steamcmd path: %v", err)
}
- steamExePath := path.Join(path.Dir(exePath), "steamcmd", "steamcmd.exe")
+ steamExePath := path.Join(localPath, "steamcmd", "steamcmd.exe")
if _, err := os.Stat(path.Join(steamExePath)); os.IsNotExist(err) {
//steamcmd is not installed
@@ -33,13 +34,13 @@ func (c *InstallerController) setupSteamCMD() error {
}
c.config.GetConfig()
- c.config.Config.SteamCMDPath = path.Join(path.Dir(exePath), "steamcmd", "steamcmd.exe")
+ c.config.Config.SteamCMDPath = path.Join(steamExePath)
c.config.SaveConfig()
} else {
//steamCMD is installed so set config to the steamCMD path
c.config.GetConfig()
- c.config.Config.SteamCMDPath = path.Join(path.Dir(exePath), "steamcmd", "steamcmd.exe")
+ c.config.Config.SteamCMDPath = path.Join(steamExePath)
c.config.SaveConfig()
}