fix tpl path
parent
3771b9f7f6
commit
5c9b00bd73
|
@ -101,7 +101,7 @@ func main() {
|
|||
flag.Parse()
|
||||
|
||||
unix.Unveil("./tpl", "r")
|
||||
unix.Unveil("/usr/local/share/openidec/tpl", "r")
|
||||
unix.Unveil("/var/openidec/tpl", "r")
|
||||
unix.Unveil(*echo_opt, "r")
|
||||
unix.Unveil(*users_opt, "rwc")
|
||||
unix.Unveil(filepath.Dir(*db_opt), "rwc")
|
||||
|
|
|
@ -915,10 +915,10 @@ func WebInit(www *WWW) {
|
|||
|
||||
tpl_path := "tpl"
|
||||
if _, err := os.Stat(tpl_path); errors.Is(err, os.ErrNotExist) {
|
||||
fmt.Println("./tpl not found, trying /usr/local/share/openidec/tpl..")
|
||||
tpl_path = "/usr/local/share/openidec/tpl"
|
||||
ii.Info.Printf("./tpl not found, trying /var/openidec/tpl..")
|
||||
tpl_path = "/var/openidec/tpl"
|
||||
if _, err := os.Stat(tpl_path); errors.Is(err, os.ErrNotExist) {
|
||||
fmt.Println(tpl_path, "not found")
|
||||
ii.Error.Printf(" %s not found", tpl_path)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue