wrolpi/etc/raspberrypios
Roland cdcf771ffa kiwix: a corrupt zim must not bring down the whole server
A corrupt or partial *.zim (e.g. an interrupted download) is rejected by
kiwix-manage ("Cannot add zim ..."). start_kiwix_serve.sh could then leave
Kiwix down and reported a misleading "Could not find any Zim files" — and
if the bad zim was the only one, exit 2 killed the service with no restart.

- Import each zim independently; log and skip a failed add so the remaining
  valid zims are still served.
- Always ensure a library.xml exists (empty if needed) and exec kiwix-serve
  unconditionally, so a corrupt/absent zim never stops the server starting.
- Fix the mount-wait loop, which never incremented COUNT (infinite wait
  instead of a 30s timeout).
- Add MEDIA_DIRECTORY override so the script is testable.
- Add Restart=on-failure to wrolpi-kiwix.service (matches wrolpi-api.service)
  so transient failures self-heal.
- New test harness runs the script with fake kiwix-manage/kiwix-serve shims.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 13:06:46 -06:00
..
motd Updating MOTD to suggest ip addresses on login. 2025-08-18 11:33:44 -06:00
50x.html Debian 13 (trixie) rebase: docker, debian-live-config, and pi-gen builds. 2026-07-13 15:43:08 -06:00
90-wrolpi Debian 13 (trixie) rebase: docker, debian-live-config, and pi-gen builds. 2026-07-13 15:43:08 -06:00
Caddyfile Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00
Caddyfile.onboarding Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00
controller-logo.png Creating WROLPi Controller desktop icon. 2026-02-14 17:05:57 -07:00
controller.desktop Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00
gnome-disks.desktop Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens. 2026-04-09 15:01:05 -06:00
wrolpi-api-dev.service Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
wrolpi-api.service Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
wrolpi-app-dev.service Adding wrolpi-app-dev which runs frontend in dev mode. 2025-12-18 18:01:45 -07:00
wrolpi-app.service Adding wrolpi-app-dev which runs frontend in dev mode. 2025-12-18 18:01:45 -07:00
wrolpi-cert-renew.service Replace nginx with Caddy for TLS termination and reverse proxying. 2026-03-07 18:48:44 -07:00
wrolpi-cert-renew.timer Replace nginx with Caddy for TLS termination and reverse proxying. 2026-03-07 18:48:44 -07:00
wrolpi-controller.service Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
wrolpi-first-startup.service Creating script which runs on first startup only. This is used to copy /etc/skel files to first user's home directory. 2024-06-18 16:17:54 -06:00
wrolpi-fix-media-permissions.service Creating script that fixes media directory file and directory permissions, adding it to the Controller UI. 2026-03-05 17:58:21 -07:00
wrolpi-help-files.desktop Moving HTTP kiwix/help services to 9085/9086 ports. Nginx will serve HTTPS proxy for kiwix/help services at the old ports. Modifying apache2 to use HTTPS to serve map. 2024-06-12 21:38:51 -06:00
wrolpi-help-script.service Controller: add help.sh to the Maintenance Scripts. 2026-07-09 16:00:43 -06:00
wrolpi-help.desktop A directory containing files that have been tagged is maintained automatically by WROLPi. 2024-10-16 18:56:05 -06:00
wrolpi-help.service Modifying niceness of WROLPi services to facilitate API startup. 2025-03-03 19:28:35 -07:00
wrolpi-kiwix.service kiwix: a corrupt zim must not bring down the whole server 2026-07-20 13:06:46 -06:00
wrolpi-mounts.service Merging wrolpi-portable into debian-live-config; unifying Postgres on /media/wrolpi/config/postgresql. 2026-05-24 12:44:05 -06:00
wrolpi-repair.service Enhancing Controller to run scripts, starting with the repair and upgrade scripts for onboarding use. 2026-02-25 17:08:32 -07:00
wrolpi-upgrade.service upgrade.sh delegates to wrolpi-upgrade service so that logs are visible in controller, even if launched from terminal. 2026-02-03 16:42:06 -07:00
wrolpi.desktop Moving HTTP kiwix/help services to 9085/9086 ports. Nginx will serve HTTPS proxy for kiwix/help services at the old ports. Modifying apache2 to use HTTPS to serve map. 2024-06-12 21:38:51 -06:00
wrolpi.target Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00