Skip to content

Instantly share code, notes, and snippets.

@blackjack75
Created April 6, 2024 18:57
Show Gist options
  • Save blackjack75/29040d437abe90aa0ee18e87de3d397a to your computer and use it in GitHub Desktop.
Save blackjack75/29040d437abe90aa0ee18e87de3d397a to your computer and use it in GitHub Desktop.
Kiwix start script On my minipc
#!/bin/bash
ZIMDIR=/hugedisk/kiwix/zims
LIBRARY_XML=/hugedisk/kiwix/library.xml
pkill kiwix-serve
touch $LIBRARY_XML
echo "Will scan zimdir: $ZIMDIR"
for f in "$ZIMDIR"/*.zim; do
if [[ -f "$f" ]]; then
echo "adding $f"
( set -x; kiwix-manage "$LIBRARY_XML" add $f )
fi
done
kiwix-serve --port 8088 --monitorLibrary --library "$LIBRARY_XML"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment