Created
April 6, 2024 18:57
-
-
Save blackjack75/29040d437abe90aa0ee18e87de3d397a to your computer and use it in GitHub Desktop.
Kiwix start script On my minipc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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