Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
eole-wol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
primtux-eole
Grenoble
eole-wol
Commits
44542a92
Verified
Commit
44542a92
authored
5 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Get ip on partage side
parent
295bd086
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
wol/scripts/get_ips.sh
+0
-3
0 additions, 3 deletions
wol/scripts/get_ips.sh
wol/scripts/wakeonlanservice.sh
+9
-1
9 additions, 1 deletion
wol/scripts/wakeonlanservice.sh
wol/www/index.php
+6
-7
6 additions, 7 deletions
wol/www/index.php
with
15 additions
and
11 deletions
wol/scripts/get_ips.sh
deleted
100755 → 0
+
0
−
3
View file @
295bd086
#!/bin/bash
awk
'/^lease/{IP=$2} /hardware ethernet/{gsub(";","",$3);if($3 == "'
$1
'"){print IP}}'
\
< /var/lib/dhcp/dhcpd.leases |
sort
-u
This diff is collapsed.
Click to expand it.
wol/scripts/wakeonlanservice.sh
+
9
−
1
View file @
44542a92
...
...
@@ -47,6 +47,14 @@ do
done
elif
[
$MAC
==
"get_registry"
]
then
stdbuf
-oL
cat
/etc/registry/hosts | netcat
$host
$port
hostfile
=
"/etc/registry/hosts"
while
read
line
do
mac
=
$(
echo
$line
|
cut
-d
' '
-f
2
)
IPS
=
$(
getip
$mac
|
sed
-e
's/ /,/g'
)
echo
"
$line
$IPS
"
>>
$hostfile
-
$$
done
<
$hostfile
stdbuf
-oL
cat
$hostfile
-
$$
| netcat
$host
$port
rm
$hostfile
-
$$
fi
done
This diff is collapsed.
Click to expand it.
wol/www/index.php
+
6
−
7
View file @
44542a92
...
...
@@ -41,20 +41,19 @@ $lines=shell_exec("../scripts/get_registry.sh");
$registry
=
array
();
foreach
(
explode
(
PHP_EOL
,
$lines
)
as
$line
){
if
(
$line
!=
""
){
$IPS
=
shell_exec
(
"../script/get_ips.sh "
.
escapeshellarg
(
$entry
[
1
]));
$entry
=
explode
(
' '
,
$line
);
array_push
(
$registry
,
$entry
);
# Format date mac name [num_apt_upgrade deb_version pt_version git_branch git_update]
# Format date mac name
ip
[num_apt_upgrade deb_version pt_version git_branch git_update]
echo
"<tr>"
;
echo
"<td>"
.
$entry
[
2
]
.
"</td>"
;
echo
"<td> "
.
$
IPS
.
"</td>"
;
echo
"<td> "
.
$
entry
[
3
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
#echo "<td>".$entry[0]."</td>";
if
(
count
(
$entry
)
>
3
){
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
if
(
count
(
$entry
)
>
4
){
echo
"<td>"
.
$entry
[
5
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
3
]
.
" mises à jour en attente</td>"
;
echo
"<td> branch "
.
$entry
[
6
]
.
" "
.
$entry
[
7
]
.
" commits en retard</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>"
;
}
else
{
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment