Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

remove shutdown from ui

roryclear39634cffffdd
diff --git a/clearcam.py b/clearcam.py
index b93f162..1b1c441 100644
--- a/clearcam.py
+++ b/clearcam.py
@@ -932,19 +932,7 @@ class HLSRequestHandler(BaseHTTPRequestHandler):
else:
database.run_put("counters", cam_name, RollingClassCounter(cam_name=cam_name))
self.send_200([])
-
- if parsed_path.path == "/shutdown":
- threading.Thread(target=self.server.shutdown).start()
- for proc in active_subprocesses:
- try:
- proc.terminate()
- proc.wait(timeout=5)
- except:
- try:
- proc.kill()
- except:
- pass
- sys.exit(0)
+
if parsed_path.path == "/reset_counts":
if not cam_name:
diff --git a/mainview.html b/mainview.html
index e2f4ace..d8c4f7e 100644
--- a/mainview.html
+++ b/mainview.html
@@ -580,10 +580,6 @@
background: var(--accent-hover);
}
- .shutdown-wrapper {
- margin-top: 20px;
- }
-
#zoneModal button {
padding: 8px 16px;
background: var(--accent-primary);
@@ -1324,9 +1320,6 @@
<button type="button" id="setMaxStorageBtn">Set</button>
</div>
</div>
- <div class="shutdown-wrapper">
- <button class="shutdown-button" onclick="shutdownServer()">Shutdown Server</button>
- </div>
</div>
<div class="events-section">
@@ -2767,20 +2760,6 @@
}
}
- async function shutdownServer() {
- if (!confirm("Are you sure you want to shut down the server?")) return;
- activeVideoStreams.forEach((stream, camName) => {
- cleanupCameraStream(camName);
- });
-
- const res = await fetch('/shutdown');
- if (res.ok) {
- alert("Server is shutting down...");
- } else {
- alert("Shutdown failed.");
- }
- }
-
async function fetchMaxStorage() {
try {
const res = await fetch('/get_max_storage');