We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f4db2 commit 0f68e3fCopy full SHA for 0f68e3f
pkg/relay/service.go
@@ -30,6 +30,8 @@ const envTemplate = `
30
DOMAIN={{.Domain}}
31
RELAY_NAME=nostr-relay-pyramid
32
RELAY_PUBKEY={{.PubKey}}
33
+DATABASE_PATH=/var/lib/nostr-relay-pyramid/db
34
+USERDATA_PATH=/var/lib/nostr-relay-pyramid/users.json
35
`
36
37
// Path for the systemd service file
@@ -84,7 +86,8 @@ func SetupRelayService(domain, pubKey string) {
84
86
log.Fatalf("Error creating data directory: %v", err)
85
87
}
88
- 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()
91
if err != nil {
92
log.Fatalf("Error setting ownership of the data directory: %v", err)
93
0 commit comments