1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-03 00:14:23 +00:00

Add notification config in seafile.conf (#593)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2023-02-09 12:02:22 +08:00
committed by GitHub
parent dcda34478f
commit 4a21c835d3
2 changed files with 31 additions and 19 deletions

View File

@@ -35,14 +35,14 @@ func init() {
}
func loadNotifConfig() {
notifyConfPath := filepath.Join(configDir, "notification.conf")
notifyConfPath := filepath.Join(configDir, "seafile.conf")
config, err := ini.Load(notifyConfPath)
if err != nil {
log.Fatalf("Failed to load notification.conf: %v", err)
}
section, err := config.GetSection("general")
section, err := config.GetSection("notification")
if err != nil {
log.Fatal("No general section in seafile.conf.")
}
@@ -65,11 +65,11 @@ func loadNotifConfig() {
logLevel = key.String()
}
if key, err := section.GetKey("private_key"); err == nil {
if key, err := section.GetKey("jwt_private_key"); err == nil {
privateKey = key.String()
}
if key, err := section.GetKey("notification_token"); err == nil {
if key, err := section.GetKey("seafile_auth_token"); err == nil {
notifToken = key.String()
}