Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lionel Ferrafiat
RIE-2017-ProjetTutore-G1
Commits
7e082909
Commit
7e082909
authored
Dec 14, 2018
by
Romain Benit
🥇
Browse files
Merge branch 'master' of gricad-gitlab.univ-grenoble-alpes.fr:ferrafli/RIE-2017-ProjetTutore-G1
parents
06b3d75f
1f882370
Changes
2
Hide whitespace changes
Inline
Side-by-side
SiteWeb/html/certif-env.php
View file @
7e082909
...
...
@@ -92,10 +92,14 @@ else{
//echo 'fin copie de fichier<br>';
//Sauvegarde de certification
$commande
=
'./kafka_2.10-0.10.2.1/bin/kafka-console-consumer.sh --bootstrap-server trueack.ovh:9092 --topic '
.
$nom_topic
.
' --from-beginning > ./Sauvegarde/'
.
$nom_topic
.
'.txt'
;
$commande
=
'./kafka_2.10-0.10.2.1/bin/kafka-simple-consumer-shell.sh --broker-list trueack.ovh:9092 --offset -2 --max-messages 11 --partition 0 --topic '
.
$nom_topic
.
' > ./Sauvegarde/'
.
$nom_topic
.
'.txt'
;
#$commande = './kafka_2.10-0.10.2.1/bin/kafka-console-consumer.sh --bootstrap-server trueack.ovh:9092 --topic '.$nom_topic.' --from-beginning > ./Sauvegarde/'.$nom_topic.'.txt';
//exécution command shell sur la machine destinataire
if
(
!
$stream
=
ssh2_exec
(
$connection
,
$commande
))
{
echo
'<br>'
.
"Erreur d'exécution commande shell"
;
}
?>
\ No newline at end of file
?>
SiteWeb/html/certif-lu.php
View file @
7e082909
...
...
@@ -91,9 +91,13 @@ else{
//echo 'fin copie de fichier<br>';
//Sauvegarde de certification
$commande
=
'./kafka_2.10-0.10.2.1/bin/kafka-console-consumer.sh --bootstrap-server trueack.ovh:9092 --topic '
.
$_POST
[
'topic'
]
.
' --from-beginning > ./Sauvegarde/'
.
$_POST
[
'topic'
]
.
'.txt'
;
$commande
=
'./kafka_2.10-0.10.2.1/bin/kafka-simple-consumer-shell.sh --broker-list trueack.ovh:9092 --offset -2 --max-messages 13 --partition 0 --topic '
.
$_POST
[
'topic'
]
.
' ./Sauvegarde/'
.
$_POST
[
'topic'
]
.
'.txt'
;
#$commande = './kafka_2.10-0.10.2.1/bin/kafka-console-consumer.sh --bootstrap-server trueack.ovh:9092 --topic '.$_POST['topic'].' --from-beginning > ./Sauvegarde/'.$_POST['topic'].'.txt';
//exécution command shell sur la machine destinataire
if
(
!
$stream
=
ssh2_exec
(
$connection2
,
$commande
))
{
echo
'<br>'
.
"Erreur d'exécution commande shell"
;
}
?>
\ No newline at end of file
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment