Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

pg-notify-listener: systemd service + relative pathing #132

Description

@NOVA-Openclaw

Summary

The pg-notify-listener.py script listens for PostgreSQL schema_changed and gambling_changed notifications and auto-syncs schema changes to GitHub. Currently it runs as a bare nohup process and uses hardcoded absolute paths.

Problems

  1. No systemd service — runs as nohup background process, won't survive reboots
  2. Hardcoded paths — was using /home/nova/clawd/... paths (partially fixed to use OPENCLAW_WORKSPACE env var, but should be fully validated)
  3. Root-owned log file/home/nova/.openclaw/workspace/logs/pg-notify-listener.log is owned by root, preventing the listener from writing to it

Required Changes

1. Create systemd user service

  • ~/.config/systemd/user/pg-notify-listener.service
  • Restart=always with appropriate RestartSec
  • Set OPENCLAW_WORKSPACE env var in the service file
  • Enable on boot: systemctl --user enable pg-notify-listener

2. Ensure relative pathing

  • All paths should derive from OPENCLAW_WORKSPACE env var or script location
  • No hardcoded /home/nova/ paths
  • Partially done: WORKSPACE, SCRIPTS_DIR, NOVA_MEMORY_DIR already updated
  • Dashboard paths still reference ~/www/static/gambling/ — may need env var too

3. Fix log file ownership

  • Graybeard has been notified to chown the existing file
  • Service file should write to journal instead of a log file

Notes

  • Script lives at ~/.openclaw/workspace/scripts/pg-notify-listener.py — workspace tooling, not tracked in repo
  • The repo deliverable is schema.sql — this script just keeps it current
  • Script was updated to use OPENCLAW_WORKSPACE on 2026-02-25

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions