Clean up RPi service reload output
This commit is contained in:
parent
836eeed40f
commit
727ab402a3
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue