feature: #62 Warn users on detecting PUID or PGID
This commit is contained in:
parent
9df1a127c2
commit
dfaec75e94
|
|
@ -70,9 +70,18 @@ func init() {
|
|||
})
|
||||
|
||||
reloadConfig()
|
||||
|
||||
warnIfPuidGuid()
|
||||
|
||||
log.Info("Init complete")
|
||||
}
|
||||
|
||||
func warnIfPuidGuid() {
|
||||
if os.Getenv("PUID") != "" || os.Getenv("PGID") != "" {
|
||||
log.Warnf("PUID or PGID seem to be set to something, but they are ignored by OliveTin. Please check https://docs.olivetin.app/no-puid-pgid.html")
|
||||
}
|
||||
}
|
||||
|
||||
func reloadConfig() {
|
||||
if err := viper.UnmarshalExact(&cfg); err != nil {
|
||||
log.Errorf("Config unmarshal error %+v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue