Repository navigation
Add read-only health check script / Salt okunur sağlık kontrolü betiği - #12
Merged
Merged
Conversation
scripts/status.sh checks the things that usually go wrong on a running box, without changing anything and without sudo: * free space on the SD card and on /library, and whether /library is its own disk * nginx, kiwix-serve, hostapd, dnsmasq and kolibri services * hotspot interface in AP mode, SSID, connected clients and the br0 bridge * homepage and Kiwix answering through nginx * ZIMs from config/content.conf that are missing, unfinished .part downloads, and ZIMs on disk that are not in the Kiwix library yet * CPU temperature, under-voltage and throttling via vcgencmd Each finding points to the existing fix in the README. The script exits 1 when it finds a problem, so it can also run from cron. Also documents it in the repo layout and at the top of Troubleshooting, in English and Turkish.
Owner
|
Eline sağlık, sorunu bulunca direkt çözümü göstermesi çok iyi fikir. Kendi Pi'mde çalıştırıp sonucu buraya yazarım, sorun çıkmazsa merge ederim. Great work, pointing straight to the fix is a really nice idea. I'll run it on my Pi and post the results here, will merge if nothing breaks. |
Contributor
Author
|
Teşekkürler! Çıktıda tuhaf bir şey görürsen buraya yapıştır, düzeltirim. Thanks! If anything looks off in the output, paste it here and I'll fix it. |
Owner
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

EN
Adds
scripts/status.sh, a read-only health check for a running box. It needs no sudo and changes nothing.It checks:
/library, and whether/libraryis its own disknginx,kiwix-serve,hostapd,dnsmasqandkolibriservices (not installed ones are listed, not counted as errors)br0bridgeconfig/content.confthat are missing, unfinished.partdownloads, and ZIMs on disk that are not inlibrary.xmlyet (so they don't show up on the homepage)vcgencmd get_throttled, plus the Pi 5 input voltageEvery finding points to the existing fix (the README troubleshooting entry,
download-content.shoriiab-make-kiwix-lib). Exit code is 1 when a problem is found, so it can also run from cron. The README gets a line in the repo layout and a short paragraph at the top of Troubleshooting, in both languages.It only adds a new file and two README paragraphs, so it does not overlap with #3, #4 or #5. It reads
content.confin the same<folder> <prefix>format that #3 keeps.Testing: ShellCheck is clean. I ran it in a throwaway Debian container in three setups: a bare system, a box with stubbed
systemctl,iw,ip,curlandvcgencmdreporting failures (failed hostapd,br0down, Kiwix not answering, missing and unlisted ZIMs, a.partfile,throttled=0x50005), and a healthy box (exit 0). I have not run it on real Pi 5 hardware yet, so a run on a real box would be very welcome.TR
Çalışan bir kurulum için salt okunur bir sağlık kontrolü olan
scripts/status.shekler. sudo gerektirmez, hiçbir şeyi değiştirmez.Kontrol ettikleri:
/libraryüzerindeki boş alan,/library'nin ayrı bir disk olup olmadığınginx,kiwix-serve,hostapd,dnsmasqvekolibriservisleri (kurulu olmayanlar hata sayılmaz, sadece listelenir)br0köprüsüconfig/content.confiçindeki ZIM'lerden eksik olanlar, yarım kalan.partindirmeleri ve diskte oluplibrary.xml'de olmadığı için ana sayfada görünmeyen ZIM'lervcgencmd get_throttledile işlemci sıcaklığı, düşük voltaj ve yavaşlama, ayrıca Pi 5 giriş voltajıHer bulgu mevcut çözüme yönlendirir (README sorun giderme maddesi,
download-content.shya daiiab-make-kiwix-lib). Sorun bulursa 1 koduyla çıkar, cron ile de çalıştırılabilir. README'ye iki dilde repo yapısı satırı ve sorun giderme başına kısa bir paragraf eklendi.Yalnızca yeni bir dosya ve iki README paragrafı eklediği için #3, #4 ve #5 ile çakışmaz.
content.conf'u #3'ün de koruduğu<klasör> <ön ek>biçiminde okur.Test: ShellCheck temiz. Kullan-at bir Debian konteynerinde üç durumda çalıştırdım: çıplak sistem, hata döndüren sahte
systemctl,iw,ip,curlvevcgencmdile arızalı kurulum (çökmüş hostapd, kapalıbr0, yanıt vermeyen Kiwix, eksik ve kütüphanede olmayan ZIM'ler,.partdosyası,throttled=0x50005) ve sağlıklı kurulum (çıkış 0). Gerçek Pi 5 üzerinde henüz denemedim; gerçek bir cihazda deneyen olursa çok sevinirim.