Pulse/internal/utils/paths.go
Pulse Monitor 287742ef91 fix: resolve config path confusion causing read-only errors
- Fix utils.GetDataDir() to default to /etc/pulse instead of /var/lib/pulse
- Add explicit PULSE_DATA_DIR=/etc/pulse to systemd service
- This fixes issue #254 where alerts were trying to use wrong directory
- Ensures consistency: Docker uses /data, manual installs use /etc/pulse
2025-08-06 07:09:47 +00:00

13 lines
No EOL
224 B
Go

package utils
import (
"os"
)
// GetDataDir returns the data directory path from environment or default
func GetDataDir() string {
if dir := os.Getenv("PULSE_DATA_DIR"); dir != "" {
return dir
}
return "/etc/pulse"
}