This commit is contained in:
2025-08-02 13:57:24 -03:00
parent 7a73528838
commit 5f07a8825a
2 changed files with 19 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"net/http"
"os"
"path/filepath"
"packets/internal"
@@ -22,10 +23,10 @@ func main() {
internal.PacketsPackageDir()
var cfg ConfigTOML
toml.Decode("opt/packets/packets/config.toml", &cfg)
toml.Decode(filepath.Join(internal.PacketsPackageDir(), "config.toml"), &cfg)
pid := os.Getpid()
if err := os.WriteFile("./http.pid", []byte(fmt.Sprint(pid)), 0644); err != nil {
if err := os.WriteFile(filepath.Join(internal.PacketsPackageDir(), "http.pid"), []byte(fmt.Sprint(pid)), 0644); err != nil {
fmt.Println("error saving subprocess pid", err)
}