Add Yunohost setup guide and make the poller lock per-script

The poller's lock file in /tmp could be left owned by another user after a
manual run, leaving cron unable to open it. Lock the script file instead.

SETUP.md walks through installing the site on Yunohost, including the
/etc/cron.d entry for the poller, which was missing on the server and left
the recently played list empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel MesserandClaude Opus 5.5 committed 2026-10-29 20:48:52 -05:00
1 parent 5c5e2e17ba
commit 6e8b473dff
3 files changed
+210 -3

No files matched your search

+2 -1
View File
@@ -45,6 +45,7 @@ Command-line tools (run over SSH from the site root):
Other:
- [sql/schema.sql](sql/schema.sql) — Full database schema plus seed data for the five shows. Safe to re-run.
- [config/db_credentials.example.php](config/db_credentials.example.php) — Template for the gitignored `config/db_credentials.php`.
- [SETUP.md](SETUP.md) — Step-by-step guide to installing the site on a Yunohost server, including the poller cron job.
## Architecture
@@ -121,7 +122,7 @@ There is no staging environment — changes go straight to production.
Server-only setup (one-time, or when the schema changes):
- Apply the schema: `mysql -u <db_user> -p <db_name> < sql/schema.sql` (use `sudo mysql <db_name> < sql/schema.sql` if the database user lacks CREATE privileges).
- Upload `config/db_credentials.php` with the server's credentials.
- Add the cron entry: `* * * * * php /path/to/rfe/cli/poll_icecast.php`, run as a user that can read the credentials file.
- Add the cron entry in `/etc/cron.d` (see [SETUP.md](SETUP.md)): `* * * * * <app_user> /usr/bin/php8.x /path/to/rfe/cli/poll_icecast.php`, run as a user that can read the credentials file. Without it the recently played list stays empty and queued shows never start.
- Make `images/backgrounds/` writable by the user PHP runs as.
- Create an admin account with `php cli/create_admin.php <username>`.