godns

command module
v0.0.0-...-5d6f76b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

README

GoDNS

Build Status

GoDNS is a dynamic DNS (DDNS) tool, it is based on my early open source project: DynDNS.

Now I rewrite DynDNS by Golang and call it GoDNS.

Pre-condition

  • GoDNS relies on DNSPod and its API.

  • To use GoDNS, you need a domain and hosted on DNSPod.

Build it

Get & build it from source code

  • Get source code from Github:
git clone https://github.com/timothyye/godns.git
  • Go into the godns directory, get related library and then build it:
cd godns
go get
go build

Config it

  • Get config_sample.json from Github.
  • Rename it to config.json.
  • Configure your domain/sub-domain info, username and password of DNSPod account.
  • Configure log file path, max size of log file, max count of log file.
  • Configure user id, group id for safety.
  • Save it in the same directory of GoDNS, or use -c=your_conf_path command.

Run it as a daemon manually

nohup ./godns &

Run it as a daemon, manage it via Upstart

  • Install upstart first
  • Copy ./upstart/godns.conf to /etc/init
  • Start it as a system service:
sudo start godns

Run it in docker

Now godns supports to run in docker.

  • Pull godns image from docker hub:
docker pull timothyye/godns:1.0
  • Run godns in container and pass config parameters to it via enviroment variables:
docker run -d --name godns --restart=always \
-e EMAIL=your_dnspod_account \
-e PASSWORD=your_dnspod_password \
-e DOMAIN=your_domain \
-e SUB_DOMAIN=your_sub_domain DOCKER_IMAGE_ID                                                                                              

Enjoy it!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL