1 |
43cbe855
|
Renato Botelho
|
#!/usr/local/bin/php
|
2 |
ba905744
|
Scott Ullrich
|
<?php
|
3 |
38b52836
|
Scott Ullrich
|
/*
|
4 |
ac24dc24
|
Renato Botelho
|
* rc.notify_message
|
5 |
|
|
*
|
6 |
|
|
* part of pfSense (https://www.pfsense.org)
|
7 |
38809d47
|
Renato Botelho do Couto
|
* Copyright (c) 2010-2013 BSD Perimeter
|
8 |
|
|
* Copyright (c) 2013-2016 Electric Sheep Fencing
|
9 |
37d60e23
|
Luiz Souza
|
* Copyright (c) 2014-2025 Rubicon Communications, LLC (Netgate)
|
10 |
ac24dc24
|
Renato Botelho
|
* All rights reserved.
|
11 |
|
|
*
|
12 |
b12ea3fb
|
Renato Botelho
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
13 |
|
|
* you may not use this file except in compliance with the License.
|
14 |
|
|
* You may obtain a copy of the License at
|
15 |
ac24dc24
|
Renato Botelho
|
*
|
16 |
b12ea3fb
|
Renato Botelho
|
* http://www.apache.org/licenses/LICENSE-2.0
|
17 |
ac24dc24
|
Renato Botelho
|
*
|
18 |
b12ea3fb
|
Renato Botelho
|
* Unless required by applicable law or agreed to in writing, software
|
19 |
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
20 |
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21 |
|
|
* See the License for the specific language governing permissions and
|
22 |
|
|
* limitations under the License.
|
23 |
ac24dc24
|
Renato Botelho
|
*/
|
24 |
ba905744
|
Scott Ullrich
|
|
25 |
17c2c2fa
|
Phil Davis
|
require_once("config.inc");
|
26 |
|
|
require_once("functions.inc");
|
27 |
|
|
require_once("notices.inc");
|
28 |
ba905744
|
Scott Ullrich
|
|
29 |
1ead3516
|
Renato Botelho
|
$arguments = getopt("em:");
|
30 |
ba905744
|
Scott Ullrich
|
|
31 |
|
|
$send_email = false;
|
32 |
|
|
$message = "";
|
33 |
|
|
|
34 |
e173dd74
|
Phil Davis
|
foreach ($arguments as $item => $arg) {
|
35 |
|
|
switch ($item) {
|
36 |
ba905744
|
Scott Ullrich
|
case "e":
|
37 |
|
|
$send_email = true;
|
38 |
|
|
break;
|
39 |
|
|
case "m":
|
40 |
|
|
$message = $arg;
|
41 |
|
|
break;
|
42 |
|
|
}
|
43 |
|
|
}
|
44 |
|
|
|
45 |
e173dd74
|
Phil Davis
|
if ($message) {
|
46 |
|
|
if ($send_email) {
|
47 |
61a326a4
|
Viktor G
|
notify_all_remote($message);
|
48 |
ba905744
|
Scott Ullrich
|
}
|
49 |
|
|
}
|
50 |
|
|
|
51 |
17c2c2fa
|
Phil Davis
|
?>
|