Save server EntryRoot and OS type during init, use to progress toward Windows server support

This commit is contained in:
2024-05-30 22:57:05 -04:00
parent 6cf01e0d3c
commit b03d751618
4 changed files with 30 additions and 14 deletions
+3
View File
@@ -6,6 +6,7 @@ import (
"github.com/rwinkhart/MUTN/src/cli"
"github.com/rwinkhart/MUTN/src/sync"
"os"
"strconv"
"strings"
)
@@ -30,6 +31,8 @@ func main() {
case "register":
// register a new device ID
os.Create(backend.ConfigDir + backend.PathSeparator + "devices" + backend.PathSeparator + args[2])
// print EntryRoot and bool indicating OS type to stdout for client to store in config
fmt.Print(backend.EntryRoot + "\x1d" + strconv.FormatBool(backend.IsWindows))
case "init":
// create the necessary directories for libmuttonserver to function
backend.DirInit()