GithubHelp home page GithubHelp logo

tassos / cpanel-dnsupdater Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paultrost/cpanel-dnsupdater

0.0 2.0 0.0 18 KB

Dynamic DNS updater using a domain on a cPanel server

License: GNU General Public License v2.0

Perl 100.00%

cpanel-dnsupdater's Introduction

NAME

cpanel-dnsupdater.pl

VERSION

0.8.7

USAGE

cpanel-dnsupdater.pl [options]

Example:
cpanel-dnsupdater.pl --host home --domain domain.tld --cpanel_user cptest --cpanel_pass 12345 --cpanel_domain cptest.tld --check_host 8.8.8.8

DESCRIPTION

This script is useful for updating the IP address of an A record on a cPanel hosted domain with either a supplied IP, or a detected IP. This allows you to use your own cPanel domain for dynamic DNS instead of having to use a third party DNS service. 

If your specify email address parameters, then script output is emailed to you, otherwise all output is printed to STDOUT.

ARGUMENTS

Required

--host          Host name to update in the domain's zonefile. eg. 'www'
--domain        Name of the domain to update
--cpanel_user   cPanel account login name
--cpanel_pass   cPanel account password
--cpanel_domain cPanel account domain name
--check_host    IP address of host to check for connectivity. eg. 8.8.8.8 or your DNS resolver

Optional

--ip              IP address to update the A record with. This defaults to the detected external IP.
--email_auth_user Email address for SMTP Auth
--email_auth_pass Password for SMTP Auth (use \ to escape characters)
--email_addr      Email address to send successful/error report to (defaults to email_auth_user)
--outbound_server Server to send mail through
--helo            Change the HELO that is sent to the outbound server, this setting defaults to the current hostname
--config_file     Specify the location of a configuration file (defaults to ~/.cpaneldyndns)

Using a Config File (~/.cpaneldyndns)

Instead of passing options on the command line, a configuration file can be used.
Any options specified on the command line will be overriden by the configuration file options.
The file takes the format of 'option=value', eg:
host=home
domain=mydomain.com

The default location of the file is in the home directory of the current user and the default filename is '.cpaneldyndns'

EXIT STATUS

Exits with 1 if there was any issue updating the record, 255 if the end of script was reached in error, and 0 if IP was either changed, or the detected IP matches the given IP.

AUTHOR

Paul Trost <[email protected]>
Original code by Stefan Gofferje - http://stefan.gofferje.net/

LICENSE AND COPYRIGHT

Copyright 2012, 2013, 2014, 2015.
This script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2, or at your option any later version.
<http://gnu.org/licenses/gpl.html>

cpanel-dnsupdater's People

Contributors

paultrost avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.