Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fogbow
fogbow-green-sitter
Commits
4e79d2bf
Commit
4e79d2bf
authored
Mar 30, 2015
by
aninhacostaribeiro
Browse files
Updated wake on lan.
parent
dc33acce
Changes
2
Show whitespace changes
Inline
Side-by-side
server.properties.example
View file @
4e79d2bf
...
...
@@ -12,3 +12,5 @@ openstack.tenant = fogbow-project
greenstrategy.gracetime = 1800
greenstrategy.expirationtime = 300
wol.broadcast.address = 123.123.255.255
src/main/java/org/fogbowcloud/green/server/communication/ServerCommunicationComponent.java
View file @
4e79d2bf
...
...
@@ -11,17 +11,20 @@ import org.xmpp.packet.IQ.Type;
public
class
ServerCommunicationComponent
extends
XMPPComponent
{
private
GreenStrategy
gs
;
private
Properties
prop
;
public
ServerCommunicationComponent
(
Properties
prop
,
GreenStrategy
gs
)
{
super
(
prop
.
getProperty
(
"xmpp.jid"
),
prop
.
getProperty
(
"xmpp.password"
),
prop
.
getProperty
(
"xmpp.host"
),
Integer
.
parseInt
(
prop
.
getProperty
(
"xmpp.port"
)));
this
.
prop
=
prop
;
this
.
gs
=
gs
;
addHandlers
();
}
public
void
wakeUpHost
(
String
macAddress
)
throws
IOException
{
ProcessBuilder
pb
=
new
ProcessBuilder
(
"powerwake"
,
macAddress
);
ProcessBuilder
pb
=
new
ProcessBuilder
(
"powerwake"
,
"-b"
,
prop
.
getProperty
(
"wol.broadcast.address"
),
macAddress
);
pb
.
start
();
}
...
...
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