Skip to content

Commit

Permalink
remove coordinator backup at deamon start
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Oct 9, 2024
1 parent 989dcbe commit 2d76beb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ public static function deamon_start() {
$cmd = '';
$cmd .= 'ZIGBEE2MQTT_DATA=' . $data_path;
$cmd .= ' npm start --prefix ' . $z2m_path;
if(file_exists($data_path.'/coordinator_backup.json')){
shell_exec(system::getCmdSudo().' rm -rf'.$data_path.'/coordinator_backup.json');
}
log::add(__CLASS__, 'info', __('Démarrage du démon Z2M', __FILE__) . ' : ' . $cmd);
exec(system::getCmdSudo() . $cmd . ' >> ' . log::getPathToLog('z2md') . ' 2>&1 &');
$i = 0;
Expand Down

0 comments on commit 2d76beb

Please sign in to comment.