wrolpi/etc/raspberrypios/50x.html

87 lines
2.6 KiB
HTML

<html lang="en">
<body>
<h1>Error!</h1>
<p>nginx could not find WROLPi! Are your services running?</p>
<p><b>sudo systemctl status wrolpi-app</b></p>
<p><b>sudo systemctl status wrolpi-api</b></p>
<br/>
<p>If either of those services are not running, start all WROLPi services:</p>
<p><b>sudo systemctl start wrolpi.target</b></p>
<br/>
<p>Or, start them individually:</p>
<p><b>sudo systemctl start wrolpi-app</b></p>
<p><b>sudo systemctl start wrolpi-api</b></p>
<p><b>sudo systemctl start wrolpi-kiwix</b></p>
<br/>
<p>View the logs</p>
<p><b>journalctl -u wrolpi-app</b></p>
<p><b>journalctl -u wrolpi-api</b></p>
<p><b>journalctl -u wrolpi-kiwix</b></p>
<p>Watch the logs</p>
<p><b>journalctl -fu wrolpi-app</b></p>
<p><b>journalctl -fu wrolpi-api</b></p>
<p><b>journalctl -fu wrolpi-kiwix</b></p>
<hr/>
<h2>Help script</h2>
<p>Run the provided help script which may narrow down the scope of the problem.</p>
<p><b>bash /opt/wrolpi/help.sh</b></p>
<h2>Repair script</h2>
<p>Run the provided repair script which will attempt to automatically repair the WROLPi systems.</p>
<p><b>bash /opt/wrolpi/repair.sh</b></p>
<hr/>
<h2>Still not working?</h2>
<p>You can view the media directory by <a id="media_link" href="/media">navigating to /media</a></p>
<p>The API may be available <a id="api_link" href="#">by navigating to port 8081</a></p>
<p>The map may be available <a id="map_link" href="#">by navigating to port 8084</a></p>
<p>Kiwix may be available <a id="kiwix_link" href="#">by navigating to port 8085</a></p>
<script>
// Get the current hostname (probably an IP) link to my other ports above.
let hostname = window.location.hostname;
let media_a = document.getElementById('media_link');
if (media_a) {
let media_url = `http://${hostname}:8080/media`;
media_a.setAttribute('href', media_url);
media_a.textContent = `by navigating to ${media_url}`;
}
let api_a = document.getElementById('api_link');
if (api_a) {
let api_url = `http://${hostname}:8081`;
api_a.setAttribute('href', api_url);
api_a.textContent = `by navigating to ${api_url}`;
}
let map_a = document.getElementById('map_link');
if (map_a) {
let map_url = `http://${hostname}:8084`;
map_a.setAttribute('href', map_url);
map_a.textContent = `by navigating to ${map_url}`;
}
let kiwix_a = document.getElementById('kiwix_link');
if (kiwix_a) {
let kiwix_url = `http://${hostname}:8085`;
kiwix_a.setAttribute('href', kiwix_url);
kiwix_a.textContent = `by navigating to ${kiwix_url}`;
}
</script>
</body>
</html>