Modifications

Sauter à la navigation Sauter à la recherche
455 octets ajoutés ,  2 avril 2017 à 14:37
Ligne 65 : Ligne 65 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
{{traduction}}
+
Une fois que vous avez collé (et mis à jour) le script ci-dessus PRESSEZ CTRL+X puis Y pour sauver les changements. Ensuite nous allons le rendre exécutable de sorte que nous pourrons l'exécuter.  
 
  −
Once you have pasted and updated the above script hit CTRL+X and then Y to save changes. Next we will make the file executable so that it can be run.  
      
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 73 : Ligne 71 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Finally to ensure the script will start at boot and stop at shutdown we need to update the rc.d file.  
+
Pour finir, pour s'assurer que le script démarrera au démarrage du Pi (boot) et arrêté durant sa mise à l'arrêt, il faudra faire une mise-à-jour du fichier {{fname|rc.d}} .  
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 79 : Ligne 77 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Thats it! Nice and simple, as stated at the start the following commands will now work.  
+
Voilà! Simple et efficace. Les commandes suivantes permettent de vérifier le bon fonctionnement du service:
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 86 : Ligne 84 :  
sudo service node_red restart
 
sudo service node_red restart
 
</syntaxhighlight>
 
</syntaxhighlight>
  −
The final part to managing Node-Red is keeping it up to date. Since we cloned the Node-Red repository originaly from Git Hub we can easily pull down the latest versions whenever we want.
  −
  −
To do this it is as simple as navigating to the home directory of your installation:
  −
  −
<syntaxhighlight lang="bash">
  −
cd ~/node-red/
  −
</syntaxhighlight>
  −
  −
And to then run git pull
  −
  −
<syntaxhighlight lang="bash">
  −
sudo git pull
  −
</syntaxhighlight>
  −
  −
If there are any changes you will see them being downloaded. You can then restart Node-Red using our service script and you are ready to go again.
      
== Raspbian Jessie et SystemD ==
 
== Raspbian Jessie et SystemD ==
 
Depuis Raspbian Jessie, System 5 (mode de démarrage du système) à été remplacé par SystemD. Vous trouverez ci-dessous des informations traduites depuis le lien [http://nodered.org/docs/hardware/raspberrypi "Adding Autostart capability using SystemD"] (''nodered.org, anglais'')
 
Depuis Raspbian Jessie, System 5 (mode de démarrage du système) à été remplacé par SystemD. Vous trouverez ci-dessous des informations traduites depuis le lien [http://nodered.org/docs/hardware/raspberrypi "Adding Autostart capability using SystemD"] (''nodered.org, anglais'')
   −
The preferred way to autostart Node-RED on Pi is to use the built in systemd capability. The pre-installed version does this by using a {{fname|nodered.service}} file and start and stop scripts. You may install these by running the following commands
+
Vous pouvez démarrer automatiquement Node-RED sur un Pi en utilisant SystemD. Il est possible de démarrer et arrêter le service en utilisant le fichier {{fname|nodered.service}} et les scripts de démarrage et arrêt (''start'' et ''stop''):
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 116 : Ligne 98 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Info: These commands are run as root (sudo) - They download the three required files to their correct locations, make the two scripts executable and then reload the systemd daemon.
+
Info: ces commandes sont exécutées en "root" à l'aide de {{fname|sudo}} permettent de télécharger les 3 fichiers requis en les plaçant au bon endroit, rendre les scripts exécutables et recharger le deamon de systemd.
   −
Node-RED can then be started and stopped by using the commands {{fname|node-red-start}} and {{fname|node-red-stop}} (voyez le point précédent pour plus d'informations)
+
Node-RED peut alors être démarré et arrêté en utilisant les commandes {{fname|node-red-start}} et {{fname|node-red-stop}} (voyez le point précédent pour plus d'informations)
   −
To then enable Node-RED to run automatically at every boot and upon crashes
+
Ensuite, pour activer le démarrage automatique de Node-RED à chaque démarrage de votre Pi (ou crash)
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 126 : Ligne 108 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
It can be disabled by
+
Et vous pouvez désactiver la fonctionnalité en utilisant
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 132 : Ligne 114 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Systemd uses the {{fname|/var/log/system.log}} for logging. To filter the log use
+
Systemd utilise le fichier {{fname|/var/log/system.log}} pour logging. Vous pouvez utiliser la commande suivante '''pour filtrer les entrées''' du log:
    
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Ligne 138 : Ligne 120 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Il est également possible de modifier l'environnement de systemd et utiliser un proxy. Voyez ce [http://nodered.org/docs/hardware/raspberrypi lien dans la documentation de nodered.org].
+
Il est également possible de modifier l'environnement de SystemD et utiliser un proxy. Voyez ce [http://nodered.org/docs/hardware/raspberrypi lien dans la documentation de nodered.org].
 +
 
 +
== Mise-à-jour de Node-Red ==
 +
Un dernier point concernant la gestion de Node-Red: il faut le garder à jour. Etant donné que nous avons cloner le dépôt Node-Red original, nous pouvons rapatrier facilement la dernière version depuis le dépôt GitHub.
 +
 
 +
Pour faire cela, il suffit de vous rendre dans le répertoire d'installation de Node-Red:
    +
<syntaxhighlight lang="bash">
 +
cd ~/node-red/
 +
</syntaxhighlight>
 +
 +
Et d'exécuter la commande {{fname|git pull}} :
 +
 +
<syntaxhighlight lang="bash">
 +
sudo git pull
 +
</syntaxhighlight>
    +
S'il y a le moindre changement, il sera téléchargé et inclus dans les sources de votre clone. Vous pouvez alors redémarrer Node-Red en utilisant le script de service (écrit ci-avant) .
    
{{Rasp-Node-Red-TRAILER}}
 
{{Rasp-Node-Red-TRAILER}}
29 917

modifications

Menu de navigation