Skip to content

A live bird collage card for your Home Assistant dashboard.

ensure_db_ok (): on error: do not refresh immediately, but wait for one second. put helpers in common.php

frederik90d53a3a4383
diff --git a/scripts/common.php b/scripts/common.php
new file mode 100644
index 00000000..7b5910c1
--- /dev/null
+++ b/scripts/common.php
@@ -0,0 +1,10 @@
+<?php
+
+
+function ensure_db_ok ($sql_stmt) {
+ if($sql_stmt == False) {
+ echo "Database is busy";
+ header("refresh:1;");
+ exit;
+ }
+}