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
0c48bc7c
Verified
Commit
0c48bc7c
authored
Jul 26, 2018
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
wol/scripts/wakeonlan.sh
+25
-0
25 additions, 0 deletions
wol/scripts/wakeonlan.sh
wol/www/index.php
+44
-0
44 additions, 0 deletions
wol/www/index.php
with
69 additions
and
0 deletions
wol/scripts/wakeonlan.sh
0 → 100644
+
25
−
0
View file @
0c48bc7c
#!/bin/bash
# Copyright (C) 2018 Tetras Libre <Contact@Tetras-Libre.fr>
# Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
X
=
$(
awk
'/Allow from .*255.255.255.0/ {print $3}'
/etc/apache2/sites-available/phpmyadmin |
\
cut
-d
.
-f
3
)
MAC
=
$1
for
i
in
$(
seq
100 199
)
;
do
wakeonlan
-i
10.20.
$X
.
$i
$MAC
;
done
This diff is collapsed.
Click to expand it.
wol/www/index.php
0 → 100644
+
44
−
0
View file @
0c48bc7c
<!--
- Copyright (C) 2017 Tetras Libre <contact@tetras-libre.fr>
- Author: Beniamine, David <David.Beniamine@tetras-libre.fr>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<?php
extract
(
$_POST
);
//echo "actions '$action', uuid '$uuid', name '$name', dev '$dev'<br/>";
switch
(
$action
){
case
"wake"
:
$cmd
=
"../scripts/wakeonlan.sh"
;
echo
"<p>Mac : '
$mac
'</p>"
;
$args
=
escapeshellarg
(
$mac
);
break
;
}
if
(
strcmp
(
$cmd
,
""
)){
echo
"<p>execution de '
$cmd
$args
'</p>"
;
shell_exec
(
"
$cmd
$args
"
);
}
?>
<div
id=
"box"
>
<div
id=
"content"
>
<h1>
Interface d'allumage de PC à distance
</h1>
<p>
Merci d'indiquer l'adresse MAC du PC à réveiller
</p>
<form
action=
"index.php"
method=
"post"
>
<input
type=
"hidden"
name=
"uuid"
value=
"
<?php
echo
$uuid
?>
"
>
<input
type=
"hidden"
name=
"action"
value=
"wake"
>
<input
type=
"text"
name=
"mac"
title=
"MAC Addresse"
placeholder=
"1a:2b:3c:4e:5f"
>
<input
type=
"submit"
value=
"Démarrer"
title=
"Démarrer la machine"
>
</form
</div
>
</div>
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