Skip to content

Commit

Permalink
Update update.php
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Oct 22, 2024
1 parent 8c18e20 commit 37351c8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions install/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@
$backup_ok = true;
}
echo "[PROGRESS][10]\n";
try {
echo "Save cache state of cmd and eqLogic...";
$data = array('cmd' => array(),'eqLogic' => array());
foreach(cmd::all() as $cmd){
$data['cmd'][$cmd->getId()] = $cmd->getCache();
}
foreach(eqLogic::all() as $eqLogic){
$data['eqLogic'][$eqLogic->getId()] = $eqLogic->getCache();
}
file_put_contents('/tmp/jeedom/cache.json',json_encode($data));
echo "OK";
} catch (Exception $e) {
echo '***WARNING***' . $e->getMessage();
}
echo "[PROGRESS][12]\n";

if (init('core', 1) == 1) {
if (init('mode') == 'force') {
echo "/!\ Force update /!\ \n";
Expand Down

0 comments on commit 37351c8

Please sign in to comment.