<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://wiki.diouxx.be/index.php?action=history&amp;feed=atom&amp;title=Script_check_ftp</id>
		<title>Script check ftp - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.diouxx.be/index.php?action=history&amp;feed=atom&amp;title=Script_check_ftp"/>
		<link rel="alternate" type="text/html" href="http://wiki.diouxx.be/index.php?title=Script_check_ftp&amp;action=history"/>
		<updated>2026-04-16T16:00:39Z</updated>
		<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.30.2</generator>

	<entry>
		<id>http://wiki.diouxx.be/index.php?title=Script_check_ftp&amp;diff=280&amp;oldid=prev</id>
		<title>Ddevleeschauwer le 3 mai 2019 à 11:34</title>
		<link rel="alternate" type="text/html" href="http://wiki.diouxx.be/index.php?title=Script_check_ftp&amp;diff=280&amp;oldid=prev"/>
				<updated>2019-05-03T11:34:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version du 3 mai 2019 à 11:34&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot; &gt;Ligne 6 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 6 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lan&lt;/del&gt;=bash&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lang&lt;/ins&gt;=bash&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:279:newid:280 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ddevleeschauwer</name></author>	</entry>

	<entry>
		<id>http://wiki.diouxx.be/index.php?title=Script_check_ftp&amp;diff=279&amp;oldid=prev</id>
		<title>Ddevleeschauwer : Page créée avec « {{ Introduction | Ce script permet de vérifier si une connexion vers un serveur FTP est fonctionnel }}  On peut l'insérer dans une tâche cron ou l'éxécuter de la mani... »</title>
		<link rel="alternate" type="text/html" href="http://wiki.diouxx.be/index.php?title=Script_check_ftp&amp;diff=279&amp;oldid=prev"/>
				<updated>2019-05-03T11:33:18Z</updated>
		
		<summary type="html">&lt;p&gt;Page créée avec « {{ Introduction | Ce script permet de vérifier si une connexion vers un serveur FTP est fonctionnel }}  On peut l&amp;#039;insérer dans une tâche cron ou l&amp;#039;éxécuter de la mani... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ Introduction | Ce script permet de vérifier si une connexion vers un serveur FTP est fonctionnel }}&lt;br /&gt;
&lt;br /&gt;
On peut l'insérer dans une tâche cron ou l'éxécuter de la manière suivante&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{ Console | /home/diouxx/Scripts/check-ftp.sh &amp;gt;&amp;gt; /home/diouxx/Scripts/check-ftp.log 2&amp;gt;&amp;amp;1 }}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lan=bash&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#Couleur affichage&lt;br /&gt;
VERT=&amp;quot;\\033[1;32m&amp;quot;&lt;br /&gt;
NORMAL=&amp;quot;\\033[0;39m&amp;quot;&lt;br /&gt;
ROUGE=&amp;quot;\\033[1;31m&amp;quot;&lt;br /&gt;
ROSE=&amp;quot;\\033[1;35m&amp;quot;&lt;br /&gt;
BLEU=&amp;quot;\\033[1;34m&amp;quot;&lt;br /&gt;
BLANC=&amp;quot;\\033[0;02m&amp;quot;&lt;br /&gt;
BLANCLAIR=&amp;quot;\\033[1;08m&amp;quot;&lt;br /&gt;
JAUNE=&amp;quot;\\033[1;33m&amp;quot;&lt;br /&gt;
CYAN=&amp;quot;\\033[1;36m&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HOST=ftp.domain.com&lt;br /&gt;
LOGIN=USER&lt;br /&gt;
PASSWORD=PASSWORD&lt;br /&gt;
PORT=21&lt;br /&gt;
LOG_FILE=/home/diouxx/Scripts/check-ftp.log&lt;br /&gt;
&lt;br /&gt;
#Fonction d'horodatage pour les log&lt;br /&gt;
#$1 = Texte a afficher apres l'horodatage&lt;br /&gt;
function horodate(){&lt;br /&gt;
        horodate=`date +&amp;quot;\n%d&amp;quot;/&amp;quot;%m&amp;quot;/&amp;quot;%Y&amp;quot;-&amp;quot;%H&amp;quot;:&amp;quot;%M&amp;quot;:&amp;quot;%S -- &amp;quot;`&lt;br /&gt;
        echo -e &amp;quot;$horodate$1&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
exec 1&amp;gt;&amp;amp;2 &amp;gt;&amp;gt; $LOG_FILE&lt;br /&gt;
&lt;br /&gt;
horodate &amp;quot;START FTP CONNEXION&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ftp -i -n $HOST $PORT &amp;lt;&amp;lt; END_SCRIPT&lt;br /&gt;
quote USER $LOGIN&lt;br /&gt;
quote PASS $PASSWORD&lt;br /&gt;
ls&lt;br /&gt;
quit&lt;br /&gt;
END_SCRIPT&lt;br /&gt;
&lt;br /&gt;
if [ $? != 0 ]&lt;br /&gt;
then&lt;br /&gt;
        horodate &amp;quot;Connexion FTP \t\t\t$ROUGE[KO]$NORMAL&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
        horodate &amp;quot;Connexion FTP \t\t\t$VERT[OK]$NORMAL&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
horodate &amp;quot;END FTP CONNEXION&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Catégorie:Scripts System]]&lt;/div&gt;</summary>
		<author><name>Ddevleeschauwer</name></author>	</entry>

	</feed>