0
     	ˆÀ¿ƒA{ÃÂ 	r    	#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/add_dns                         Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;
use Cpanel::DIp::MainIP                 ();
use Cpanel::DnsUtils::Add               ();
use Cpanel::Validate::Domain::Tiny      ();
use Cpanel::Validate::Domain::Normalize ();
use Cpanel::Validate::IP::v4            ();
use Getopt::Long                        ();

my ( $domain, $ip, $reseller, $allowoverwrite, $trueowner );

my $opts = Getopt::Long::GetOptions(
    'domain=s'   => \$domain,
    'ip=s'       => \$ip,
    'reseller=s' => \$reseller,
    'overwrite'  => \$allowoverwrite,
    'owner=s'    => \$trueowner
);

# Domain
if ( !$domain ) {
    show_usage();
    exit 1;
}
else {
    $domain = Cpanel::Validate::Domain::Normalize::normalize($domain);
    if ( !Cpanel::Validate::Domain::Tiny::validdomainname($domain) ) {
        print "No valid domain specified.\n";
        show_usage();
        exit 1;
    }
}

# IP
if ( !$ip || !Cpanel::Validate::IP::v4::is_valid_ipv4($ip) ) {
    $ip = Cpanel::DIp::MainIP::getmainip();
    print "No valid IP specified. Using $ip\n";
}

# Reseller
if ( !$reseller ) {
    $reseller = 'root';
}

# Allow Over Write
if ($allowoverwrite) {
    if ( $allowoverwrite =~ m/^n/i ) {
        $allowoverwrite = 0;
    }
    else {
        $allowoverwrite = 1;
    }
}
else {
    $allowoverwrite = 0;
}

$trueowner ||= 'root';

my ( $status, $error ) = Cpanel::DnsUtils::Add::doadddns( 'domain' => $domain, 'ip' => $ip, 'reseller' => $reseller, 'trueowner' => $trueowner, 'allowoverwrite' => $allowoverwrite );
if ( !$status ) {
    print $error . "\n";
}

sub show_usage {
    print <<"EOM";
$0

Control Flags:
--domain    (required)
    Domain for zone creation

--ip        (optional)
    IP for zone creation. Defaults to server's main shared IP

--reseller  (optional)
    Set reseller (zone administrator) to utilize name server IPs assigned via WHM to the reseller.
    Defaults to using main server name server IPs

--owner     (optional)
    Account who will own the domain
    Defaults to root

--overwrite (optional)
    Allow overwrite of existing zones

EOM
    return;
}
     ˆ¾¿ƒh¹ÃÂ      N
     �ÁÃÂ      File not found.
     �ÁÃÂ      File not found.
  "   ˆl–äY>”êe¶…8 …p\Å£ÀƒiçAÄÃ     " Vim syntax file
" Language:	Lynx 2.7.1 style file
" Maintainer:	Scott Bigham <dsb@killerbunnies.org>
" Last Change:	2004 Oct 06

" quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" This setup is probably atypical for a syntax highlighting file, because
" most of it is not really intended to be overrideable.  Instead, the
" highlighting is supposed to correspond to the highlighting specified by
" the .lss file entries themselves; ie. the "bold" keyword should be bold,
" the "red" keyword should be red, and so forth.  The exceptions to this
" are comments, of course, and the initial keyword identifying the affected
" element, which will inherit the usual Identifier highlighting.

syn match lssElement "^[^:]\+" nextgroup=lssMono

syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout

syn keyword	lssBold		bold		contained
syn keyword	lssReverse	reverse		contained
syn keyword	lssUnderline	underline	contained
syn keyword	lssStandout	standout	contained

syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg

syn case ignore
syn keyword	lssRedFg		red		contained
syn keyword	lssBlueFg		blue		contained
syn keyword	lssGreenFg		green		contained
syn keyword	lssBrownFg		brown		contain