maintenance task DB

This commit is contained in:
jokob-sk
2022-01-14 14:55:14 +11:00
parent 0120d3f226
commit e1c410be21
2 changed files with 9 additions and 3 deletions

View File

@@ -37,6 +37,10 @@
id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"> Delete Devices with empty MACs </button> id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"> Delete Devices with empty MACs </button>
</div> </div>
<div class="pull-right">
<button type="button" class="btn btn-default pa-btn pa-btn-delete" style="margin-left:0px;"
id="btnDeleteMAC" onclick="askDeleteAllDevices()"> Delete All Devices </button>
</div>
<div class="pull-right"> <div class="pull-right">
<button type="button" class="btn btn-default pa-btn pa-btn-create" style="margin-left:0px;" <button type="button" class="btn btn-default pa-btn pa-btn-create" style="margin-left:0px;"
id="btnDelete" onclick="askRunScan1min()"> Run 1 min scan now</button> id="btnDelete" onclick="askRunScan1min()"> Run 1 min scan now</button>

View File

@@ -259,11 +259,13 @@ function createBackupDB() {
// echo "Error copying DB. SSH into instance and copy manually."; // echo "Error copying DB. SSH into instance and copy manually.";
// } // }
$command = escapeshellcmd('/home/pi/pialert/back/maintenance.py backup_DB'); $mystring = system('python /home/pi/pialert/back/maintenance.py backup_DB', $retval);
$output = shell_exec($command); // $command = escapeshellcmd('/home/pi/pialert/back/maintenance.py backup_DB');
// $output = shell_exec($command);
echo $output; //echo $output;
echo $retval;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------