santiago revised this gist . Go to revision
1 file changed, 17 insertions
kiwix_start.sh(file created)
@@ -0,0 +1,17 @@ | |||
1 | + | #!/bin/bash | |
2 | + | ZIMDIR=/hugedisk/kiwix/zims | |
3 | + | LIBRARY_XML=/hugedisk/kiwix/library.xml | |
4 | + | ||
5 | + | pkill kiwix-serve | |
6 | + | ||
7 | + | touch $LIBRARY_XML | |
8 | + | echo "Will scan zimdir: $ZIMDIR" | |
9 | + | for f in "$ZIMDIR"/*.zim; do | |
10 | + | if [[ -f "$f" ]]; then | |
11 | + | echo "adding $f" | |
12 | + | ( set -x; kiwix-manage "$LIBRARY_XML" add $f ) | |
13 | + | fi | |
14 | + | done | |
15 | + | ||
16 | + | kiwix-serve --port 8088 --monitorLibrary --library "$LIBRARY_XML" | |
17 | + |
Newer
Older