Clean up RPi service reload output

This commit is contained in:
juvdiaz 2026-06-29 14:00:42 -06:00
parent 836eeed40f
commit 727ab402a3
2 changed files with 6 additions and 2 deletions

View File

@ -254,7 +254,7 @@ for line in useful_lines(static_dhcp_hosts_file):
PY
sudo docker cp "${dnsmasq_file}" "${pihole_container}:/etc/dnsmasq.d/02-homelab-managed-dns.conf"
rm -f "${dnsmasq_file}"
if ! sudo docker exec "${pihole_container}" pihole restartdns reload; then
if ! sudo docker exec "${pihole_container}" pihole reloaddns; then
sudo docker restart "${pihole_container}" >/dev/null
fi
}

View File

@ -61,7 +61,7 @@ function loadDatabaseModule() {
// Try the next location used by the upstream Uptime Kuma image.
}
}
throw new Error("Could not load better-sqlite3 from the Uptime Kuma container");
return null;
}
function nowSql() {
@ -192,6 +192,10 @@ function main() {
const databasePath = process.argv[3] || "/app/data/kuma.db";
const monitors = JSON.parse(fs.readFileSync(monitorFile, "utf8"));
const Database = loadDatabaseModule();
if (!Database) {
console.log("Could not load better-sqlite3 from the Uptime Kuma container; skipping monitor seed");
return;
}
const database = new Database(databasePath);
const userTable = database