Hotfix
my method of extracting archives does not preserve permission this has be fixed with a workaround by using chmod to make factorio executable
This commit is contained in:
@@ -11,12 +11,15 @@ import (
|
|||||||
|
|
||||||
func DefCfg() *DefConfig {
|
func DefCfg() *DefConfig {
|
||||||
c := &DefConfig{}
|
c := &DefConfig{}
|
||||||
|
|
||||||
// server settings
|
// server settings
|
||||||
c.Server.ServDir = "factorio"
|
c.Server.ServDir = "factorio"
|
||||||
c.Server.ServPort = 34197
|
c.Server.ServPort = 34197
|
||||||
c.Server.ServCfg = "factorio/data/server-settings.json"
|
c.Server.ServCfg = "factorio/data/server-settings.json"
|
||||||
c.Server.ServExec = "factorio/bin/x64/factorio"
|
c.Server.ServExec = "factorio/bin/x64/factorio"
|
||||||
c.Server.WorldFile = "factorio/saves/newworld.zip"
|
c.Server.WorldFile = "factorio/saves/newworld.zip"
|
||||||
|
|
||||||
|
// factoryman settings
|
||||||
c.Factoryman.UseScreen = true
|
c.Factoryman.UseScreen = true
|
||||||
c.Factoryman.ScreenName = "factorio"
|
c.Factoryman.ScreenName = "factorio"
|
||||||
c.Factoryman.BackupDir = "factorio/backups"
|
c.Factoryman.BackupDir = "factorio/backups"
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/therootcompany/xz"
|
"github.com/therootcompany/xz"
|
||||||
)
|
)
|
||||||
|
|
||||||
func downloadHeadless() {
|
func downloadHeadless() {
|
||||||
|
var c = readCfg("config.yml")
|
||||||
headlessQuery := "https://www.factorio.com/get-download/latest/headless/linux64"
|
headlessQuery := "https://www.factorio.com/get-download/latest/headless/linux64"
|
||||||
|
|
||||||
url := headlessQuery
|
url := headlessQuery
|
||||||
@@ -42,4 +44,6 @@ func downloadHeadless() {
|
|||||||
outFile.Close()
|
outFile.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// zip does not preserve permissions correctly so i have to do this
|
||||||
|
exec.Command("chmod", "+x", c.Server.ServExec)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user