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
Grenoble
Eole-Wol
Commits
6293f9f8
Unverified
Commit
6293f9f8
authored
Aug 05, 2019
by
David Beniamine
Browse files
Remove ip from line
parent
fa7bb475
Changes
2
Hide whitespace changes
Inline
Side-by-side
registry/scripts/registry.sh
View file @
6293f9f8
...
...
@@ -47,11 +47,12 @@ do
date
=
$(
date
+%Y%m%d
)
rIP
=
$(
echo
$line
|
cut
-d
' '
-f
3
)
sline
=
$(
echo
$line
|
cut
-d
' '
-f
1-2
)
eline
=
$(
echo
$line
|
cut
-d
' '
-f
4-
)
res
=
$(
grep
"
$sline
"
$conf_file
)
if
[
!
-z
"
$res
"
]
then
# Update
sed
-i
-e
"s/^.*
$sline$/$date
$line
/"
$conf_file
sed
-i
-e
"s/^.*
$sline
.*
$/$date
$
sline
$e
line
/"
$conf_file
else
# Add
echo
"
$date
$line
"
>>
$conf_file
...
...
wol/www/index.php
View file @
6293f9f8
...
...
@@ -79,18 +79,19 @@ if(!isset($action)){
foreach
(
$lines
as
$line
){
if
(
$line
!=
""
){
$entry
=
explode
(
' '
,
$line
);
$nb_infos
=
count
(
$entry
);
array_push
(
$registry
,
$entry
);
# Format date mac name
ip
[num_apt_upgrade deb_version pt_version git_branch git_update]
# Format date mac name [num_apt_upgrade deb_version pt_version git_branch git_update]
ip
echo
"<tr>"
;
echo
"<td>"
.
$entry
[
2
]
.
"</td>"
;
echo
"<td> "
.
$entry
[
3
]
.
"</td>"
;
echo
"<td> "
.
$entry
[
$nb_infos
-
1
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
#echo "<td>".$entry[0]."</td>";
if
(
count
(
$entry
)
>
4
){
if
(
$nb_infos
>
4
){
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
5
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
6
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
4
]
.
" mises à jour en attente</td>"
;
echo
"<td> branch "
.
$entry
[
7
]
.
" "
.
$entry
[
8
]
.
" commits en retard</td>"
;
echo
"<td>"
.
$entry
[
3
]
.
" mises à jour en attente</td>"
;
echo
"<td> branch "
.
$entry
[
6
]
.
" "
.
$entry
[
7
]
.
" commits en retard</td>"
;
}
else
{
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
...
...
Write
Preview
Markdown
is supported
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