Initial server monitoring system with port 80 support
Features: - Device management and monitoring dashboard - Remote command execution on devices via port 80 - Auto-update coordination for multiple devices - Database reset functionality with safety confirmations - Server logs filtering and dedicated logging interface - Device status monitoring and management - SQLite database for comprehensive logging - Web interface with Bootstrap styling - Comprehensive error handling and logging Key components: - server.py: Main Flask application with all routes - templates/: Complete web interface templates - data/database.db: SQLite database for device logs - UPDATE_SUMMARY.md: Development progress documentation
This commit is contained in:
22
Working_Files/drop.py
Normal file
22
Working_Files/drop.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# acest script sterge informatia din baza de date pentru a avea un nou inceput .
|
||||
|
||||
import sqlite3
|
||||
|
||||
# Define the database path
|
||||
DATABASE = './data/database.db'
|
||||
|
||||
def reset_database():
|
||||
# Connect to the database
|
||||
with sqlite3.connect(DATABASE) as conn:
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Drop the existing logs table if it exists
|
||||
cursor.execute('DELETE FROM logs;')
|
||||
|
||||
|
||||
conn.commit()
|
||||
|
||||
print("Database has been reset ")
|
||||
|
||||
if __name__ == '__main__':
|
||||
reset_database()
|
||||
Reference in New Issue
Block a user