mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-09-15 21:00:27 +00:00
19 lines
360 B
Go
19 lines
360 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
E "github.com/sagernet/sing/common/exceptions"
|
|
)
|
|
|
|
func runService() (bool, error) {
|
|
if os.Getenv("INVOCATION_ID") != "" && listenAddress != "" {
|
|
return true, E.New("--listen is not allowed in service mode")
|
|
}
|
|
return false, nil
|
|
}
|
|
|
|
func preparePlatformWorkingDirectory() error {
|
|
return os.MkdirAll(workingDirectory, 0o700)
|
|
}
|