Пример #1
0
 try {
     if (init('level', -1) > -1 && init('mode') != 'force') {
         echo __("Vérification des mises à jour...", __FILE__);
         update::checkAllUpdate('', false);
         echo __("OK\n", __FILE__);
     }
 } catch (Exception $e) {
     if (init('mode') != 'force') {
         throw $e;
     } else {
         echo __('***ERREUR*** ', __FILE__) . $e->getMessage();
     }
 }
 try {
     echo __("Mise à plat des droits...", __FILE__);
     jeedom::cleanFileSytemRight();
     echo __("OK\n", __FILE__);
 } catch (Exception $e) {
     echo __('***ERREUR*** ', __FILE__) . $e->getMessage();
 }
 if (init('level', -1) < 1) {
     if (config::byKey('update::backupBefore') == 1 && init('mode') != 'force') {
         try {
             global $NO_PLUGIN_BAKCUP;
             $NO_PLUGIN_BAKCUP = true;
             global $NO_CLOUD_BAKCUP;
             $NO_CLOUD_BAKCUP = true;
             jeedom::backup();
         } catch (Exception $e) {
             if (init('mode') != 'force') {
                 throw $e;