openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5c9b00bd7309d8690a9f925d5c9341ed11a1b7d8
parent 3771b9f7f630bbddf98c22ed42898761fa48ea2a
Author: vasyahacker <vasya@magicfreedom.com>
Date:   Tue, 28 Mar 2023 17:27:27 +0400

fix tpl path

Diffstat:
Mcmd/idecd/main.go | 2+-
Mcmd/idecd/web.go | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmd/idecd/main.go b/cmd/idecd/main.go @@ -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") diff --git a/cmd/idecd/web.go b/cmd/idecd/web.go @@ -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) } }