The LaunchAgent plist now dynamically includes only ZIM files that actually exist in the kiwix directory, rather than all configured archives. This prevents kiwix-serve from crashing when torrents are still downloading. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
780 B
Django/Jinja
25 lines
780 B
Django/Jinja
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- {{ ansible_managed }} -->
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
<key>Label</key>
|
|
<string>mcquack.eblume.kiwix-serve</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>{{ kiwix_serve_bin }}</string>
|
|
<string>--port={{ kiwix_port }}</string>
|
|
{% for filename in kiwix_available_archives %}
|
|
<string>{{ kiwix_zim_dir }}/{{ filename }}</string>
|
|
{% endfor %}
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>StandardErrorPath</key>
|
|
<string>{{ kiwix_log_dir }}/mcquack.kiwix-serve.err.log</string>
|
|
<key>StandardOutPath</key>
|
|
<string>{{ kiwix_log_dir }}/mcquack.kiwix-serve.out.log</string>
|
|
</dict>
|
|
</plist>
|