Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8f68ed9a
Commit
8f68ed9a
authored
Jun 24, 2013
by
Leigh B Stoller
Browse files
Send email on shutdown and reboot.
parent
12395b47
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/testbed-control.in
View file @
8f68ed9a
#!/usr/bin/perl -w
#
# Copyright (c) 2010-201
2
University of Utah and the Flux Group.
# Copyright (c) 2010-201
3
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -147,6 +147,11 @@ if ($ARGV[0] eq "boot") {
}
$stopped
=
1
;
Restart
();
#
# Inform TBOPS.
#
SENDMAIL
(
$TBOPS
,
"
Testbed has been restarted!
",
"
Testbed has been restarted ...
\n
");
exit
(
0
);
}
...
...
@@ -218,10 +223,21 @@ if (system("$STARTUP stop >/dev/null 2>&1") ||
}
$stopped
=
1
;
#
# Inform TBOPS.
#
SENDMAIL
(
$TBOPS
,
"
Testbed has been shutdown!
",
"
Testbed has been shutdown ...
\n
");
if
(
$ARGV
[
0
]
eq
"
restart
")
{
print
"
** Testbed is stopped. Waiting a moment before restarting ...
\n
";
sleep
(
2
);
Restart
();
#
# Inform TBOPS.
#
SENDMAIL
(
$TBOPS
,
"
Testbed has been restarted!
",
"
Testbed has been restarted ...
\n
");
exit
(
0
);
}
print
"
** Testbed is stopped. Safe to power off or reboot
\n
";
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment