1
|
#!/usr/local/bin/php-cgi -f
|
2
|
<?php
|
3
|
/*
|
4
|
* rc.periodic
|
5
|
*
|
6
|
* originally based on m0n0wall (http://m0n0.ch/wall)
|
7
|
* Copyright (c) 2014-2024 Rubicon Communications, LLC (Netgate)
|
8
|
* All rights reserved.
|
9
|
*
|
10
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
* you may not use this file except in compliance with the License.
|
12
|
* You may obtain a copy of the License at
|
13
|
*
|
14
|
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
*
|
16
|
* Unless required by applicable law or agreed to in writing, software
|
17
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
* See the License for the specific language governing permissions and
|
20
|
* limitations under the License.
|
21
|
*/
|
22
|
|
23
|
require_once("periodic.inc");
|
24
|
|
25
|
switch ($argv[1]) {
|
26
|
case 'daily':
|
27
|
periodic_daily();
|
28
|
break;
|
29
|
case 'weekly':
|
30
|
periodic_weekly();
|
31
|
break;
|
32
|
case 'monthly':
|
33
|
periodic_monthly();
|
34
|
break;
|
35
|
default:
|
36
|
echo "Usage: {$argv[0]} (daily|weekly|monthly)\n";
|
37
|
}
|
38
|
|
39
|
?>
|