Dette viser forskellene mellem den valgte og den nuværende udgave af dokumentet. Gul er linjer der findes i den gamle udgave, og grøn er linjer der findes i den nuværende.
| Begge sider forrige revision Forrige revision | |||
|
cpanel_server_setup [2017/09/01 23:14] noer |
cpanel_server_setup [2021/01/26 19:43] (nuværende) noer |
||
|---|---|---|---|
| Linje 113: | Linje 113: | ||
| == DNS == | == DNS == | ||
| + | Add hook to unset NSEC3 when DNSSEC is enabled, because otherwise it cannot be transferred to the DNS slave server. | ||
| + | |||
| + | Put script in ''/ | ||
| + | < | ||
| + | # | ||
| + | <?php | ||
| + | |||
| + | // Get decoded input. | ||
| + | $input = get_passed_data(); | ||
| + | |||
| + | // Declare return variables and set their values. | ||
| + | list($result_result, | ||
| + | |||
| + | // Return the return variables. | ||
| + | echo " | ||
| + | |||
| + | // Perform the hooks action, using the decoded input. | ||
| + | function unset_nsec3($input = array()) { | ||
| + | // Insert your actions here. | ||
| + | $domain = $input[' | ||
| + | system(" | ||
| + | |||
| + | // Set success and failure messages. | ||
| + | $result = " | ||
| + | $message = "This is an error message."; | ||
| + | |||
| + | // Return the hook result and message. | ||
| + | return array($result, | ||
| + | } | ||
| + | |||
| + | // Process data from STDIN. | ||
| + | function get_passed_data() { | ||
| + | |||
| + | // Get input from STDIN. | ||
| + | $raw_data; | ||
| + | $stdin_fh = fopen(' | ||
| + | if ( is_resource($stdin_fh) ) { | ||
| + | stream_set_blocking($stdin_fh, | ||
| + | while ( ($line = fgets( $stdin_fh, 1024 )) !== false ) { | ||
| + | $raw_data .= trim($line); | ||
| + | } | ||
| + | fclose($stdin_fh); | ||
| + | } | ||
| + | |||
| + | // Process and JSON-decode the raw output. | ||
| + | if ($raw_data) { | ||
| + | $input_data = json_decode($raw_data, | ||
| + | } else { | ||
| + | $input_data = array(' | ||
| + | } | ||
| + | |||
| + | // Return the output. | ||
| + | return $input_data; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Run command to add the hook | ||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| Create new user on '' | Create new user on '' | ||