Skip to content

Commit 0f68e3f

Browse files
fix paths
1 parent 45f4db2 commit 0f68e3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/relay/service.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const envTemplate = `
3030
DOMAIN={{.Domain}}
3131
RELAY_NAME=nostr-relay-pyramid
3232
RELAY_PUBKEY={{.PubKey}}
33+
DATABASE_PATH=/var/lib/nostr-relay-pyramid/db
34+
USERDATA_PATH=/var/lib/nostr-relay-pyramid/users.json
3335
`
3436

3537
// Path for the systemd service file
@@ -84,7 +86,8 @@ func SetupRelayService(domain, pubKey string) {
8486
log.Fatalf("Error creating data directory: %v", err)
8587
}
8688

87-
err = os.Chown(dataDir, os.Getuid(), os.Getgid())
89+
// Use chown command to set ownership of the data directory to the nostr user
90+
err = exec.Command("chown", "-R", "nostr:nostr", dataDir).Run()
8891
if err != nil {
8992
log.Fatalf("Error setting ownership of the data directory: %v", err)
9093
}

0 commit comments

Comments
 (0)