Beispiel #1
0
			<td style="font-weight : bold;">{{Configuration réseaux interne}}</td>
			<?php 
if (network::test('internal')) {
    echo '<td class="alert alert-success">{{OK}}</td>';
    echo '<td></td>';
} else {
    echo '<td class="alert alert-danger">{{NOK}}</td>';
    echo '<td>{{Allez sur Général -> Administration -> Configuration puis configurez correctement la partie réseaux}}</td>';
}
?>
		</tr>

		<tr>
			<td style="font-weight : bold;">{{Configuration réseaux externe}}</td>
			<?php 
if (network::test('external')) {
    echo '<td class="alert alert-success">{{OK}}</td>';
    echo '<td></td>';
} else {
    echo '<td class="alert alert-danger">{{NOK}}</td>';
    echo '<td>{{Allez sur Général -> Administration -> Configuration puis configurez correctement la partie réseaux}}</td>';
}
?>
		</tr>
<!--
		<tr>
			<td style="font-weight : bold;">{{Configuration nginx}}</td>
			<?php 
if (exec('diff /etc/nginx/sites-available/default ' . dirname(__FILE__) . '/../../install/nginx_default | wc -l') == 0 || exec('diff /etc/nginx/sites-available/default ' . dirname(__FILE__) . '/../../install/nginx_default_without_jeedom | wc -l') == 0) {
    echo '<td class="alert alert-success">{{OK}}</td>';
    echo '<td></td>';
Beispiel #2
0
 public static function cron()
 {
     if (config::byKey('market::allowDNS') == 1 && !network::test('external', false, 120)) {
         network::dns_start();
     }
     if (config::byKey('network::disableMangement') == 1) {
         return;
     }
     if (!jeedom::isCapable('sudo')) {
         return;
     }
     try {
         $gws = self::checkGw();
         if (count($gws) == 0) {
             log::add('network', 'error', __('Aucune interface réseau trouvée, je redemarre tous les réseaux', __FILE__));
             exec('sudo service networking restart');
             return;
         }
         foreach ($gws as $iface => $gw) {
             if ($gw['ping'] != 'ok') {
                 if (strpos($iface, 'tun') !== false) {
                     continue;
                 }
                 if (strpos($iface, 'br0') !== false) {
                     continue;
                 }
                 log::add('network', 'error', __('La passerelle distante de l\'interface ', __FILE__) . $iface . __(' est injoignable, je la redemarre pour essayer de corriger', __FILE__));
                 exec('sudo ifdown ' . $iface);
                 sleep(5);
                 exec('sudo ifup --force ' . $iface);
             }
         }
     } catch (Exception $e) {
     }
 }
Beispiel #3
0
                <label class="col-xs-4 control-label">{{Complément (exemple : /jeedom)}}</label>
                <div class="col-xs-8">
                    <input type="text"  class="configKey form-control" data-l1key="externalComplement" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-4 control-label">{{Port}}</label>
                <div class="col-xs-8">
                    <input type="number" class="configKey form-control" data-l1key="externalPort" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-4 control-label">{{Statut}}</label>
                <div class="col-xs-8">
                  <?php 
$externalTest = network::test('external');
if ($externalTest) {
    echo '<span class="label label-success" style="font-size : 1em;">{{OK}}</span>';
} else {
    echo '<span class="label label-warning tooltips">{{NOK}}</span>';
}
?>
           </div>
       </div>
   </div>
</div>

<div class="row">
    <div class="col-sm-6">
        <legend>{{Gestion avancée}}</legend>
        <div class="form-group expertModeVisible has-error">