From e1c410be21ab241fd252aff4dc25c994ef4c07d6 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Fri, 14 Jan 2022 14:55:14 +1100 Subject: [PATCH] maintenance task DB --- front/maintenance.php | 4 ++++ front/php/server/devices.php | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/front/maintenance.php b/front/maintenance.php index 267f087d..b2c6fc9b 100644 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -37,6 +37,10 @@ id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"> Delete Devices with empty MACs +
+ +
diff --git a/front/php/server/devices.php b/front/php/server/devices.php index f88f950b..bc005a5e 100644 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -259,11 +259,13 @@ function createBackupDB() { // echo "Error copying DB. SSH into instance and copy manually."; // } - $command = escapeshellcmd('/home/pi/pialert/back/maintenance.py backup_DB'); - $output = shell_exec($command); + $mystring = system('python /home/pi/pialert/back/maintenance.py backup_DB', $retval); + // $command = escapeshellcmd('/home/pi/pialert/back/maintenance.py backup_DB'); + // $output = shell_exec($command); - echo $output; + //echo $output; + echo $retval; } //------------------------------------------------------------------------------