mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-15 07:35:49 -06:00
18 lines
335 B
Go
18 lines
335 B
Go
//go:build darwin
|
|
|
|
package client
|
|
|
|
import (
|
|
"os"
|
|
"os/user"
|
|
"path/filepath"
|
|
)
|
|
|
|
func init() {
|
|
u, err := user.Current()
|
|
if err == nil && u.Uid == "0" {
|
|
DefaultConfigFile = "/etc/ntfy/client.yml"
|
|
} else if configDir, err := os.UserConfigDir(); err == nil {
|
|
DefaultConfigFile = filepath.Join(configDir, "ntfy", "client.yml")
|
|
}
|
|
}
|