Rev 849 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 849 | Rev 1050 | ||
---|---|---|---|
1 | #!/usr/bin/env php |
1 | #!/usr/bin/env php |
2 | <?php |
2 | <?php |
3 | 3 | ||
4 | /* |
4 | /* |
5 | * OIDplus 2.0 |
5 | * OIDplus 2.0 |
6 | * Copyright 2019 - 2021 Daniel Marschall, ViaThinkSoft |
6 | * Copyright 2019 - 2021 Daniel Marschall, ViaThinkSoft |
7 | * |
7 | * |
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
9 | * you may not use this file except in compliance with the License. |
9 | * you may not use this file except in compliance with the License. |
10 | * You may obtain a copy of the License at |
10 | * You may obtain a copy of the License at |
11 | * |
11 | * |
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
13 | * |
13 | * |
14 | * Unless required by applicable law or agreed to in writing, software |
14 | * Unless required by applicable law or agreed to in writing, software |
15 | * distributed under the License is distributed on an "AS IS" BASIS, |
15 | * distributed under the License is distributed on an "AS IS" BASIS, |
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
17 | * See the License for the specific language governing permissions and |
17 | * See the License for the specific language governing permissions and |
18 | * limitations under the License. |
18 | * limitations under the License. |
19 | */ |
19 | */ |
20 | 20 | ||
21 | // In order to make the system faster, call this script regularly using crontabs |
21 | // In order to make the system faster, call this script regularly using crontabs |
22 | // Example: The automatic publishing of OIDs will then be done by this script |
22 | // Example: The automatic publishing of OIDs will then be done by this script |
23 | // and not by a random visitor. |
23 | // and not by a random visitor. |
24 | 24 | ||
- | 25 | use ViaThinkSoft\OIDplus\OIDplus; |
|
25 | 26 | ||
26 | try { |
27 | try { |
27 | require_once __DIR__ . '/includes/oidplus.inc.php'; |
28 | require_once __DIR__ . '/includes/oidplus.inc.php'; |
28 | 29 | ||
29 | ob_start(); |
30 | ob_start(); |
30 | OIDplus::init(false); |
31 | OIDplus::init(false); |
31 | OIDplus::invoke_shutdown(); |
32 | OIDplus::invoke_shutdown(); |
32 | ob_end_clean(); |
33 | ob_end_clean(); |
33 | 34 | ||
34 | exit(0); |
35 | exit(0); |
35 | } catch (Exception $e) { |
36 | } catch (Exception $e) { |
36 | fwrite(STDERR, $e->getMessage()); |
37 | fwrite(STDERR, $e->getMessage()); |
37 | exit(1); |
38 | exit(1); |
38 | } |
39 | } |
39 | 40 |