LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2019, 04:36 PM   #1
dmz.madrid
LQ Newbie
 
Registered: Dec 2019
Posts: 1

Rep: Reputation: Disabled
ddclient.conf vs ddclient when running ddclient as a daemoon


This is a template of the ddclient.conf and ddclient file that I use to update my ddns(I use no-ip).
I don't use the template provided by ddclient -help:
Code:
The 'No-IP Compatible' protocol is used to make dynamic dns updates
over an http request.  Details of the protocol are outlined at:
http://www.no-ip.com/integrate/

Configuration variables applicable to the 'noip' protocol are:
  protocol=noip                    ##
  server=fqdn.of.service       ## defaults to dynupdate.no-ip.com
  login=service-login          ## login name and password  registered with the service
  password=service-password    ##
  fully.qualified.host         ## the host registered with the service.

Example ddclient.conf file entries:
  ## single host update
  protocol=noip,                                        \
  login=userlogin@domain.com,                                \
  password=noip-password                           \
  myhost.no-ip.biz
I instead used this page since combined with others (for getting the PID and Cache of ddns in a separate file). These are the config files:

Code:
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

daemon=300                                                      # check every 300 seconds
pid=/var/run/ddclient.pid                                       # record PID in file
syslog=yes                                                      # record a log
ssl=yes                                                         # requires perl ssl module
cache=/var/cache/ddclient/ddclient.cache                        # cache file
#
protocol=noip                                                   # no-ip
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
server=dynupdate.no-ip.com
login='$myuser'
password='$mypass'
$hostname.ddns.net, www.#hostname.ddns.net

And the other file is this
# Configuration for ddclient scripts
# generated from debconf on Sat Dec 22 09:32:58 GMT 2012
# /etc/default/ddclient
...
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
daemon_interval="3600"
# Set to "true" if ddclient should run in daemon mode
# If this is changed to true, run_ipup and run_dhclient must be set to false.
run_daemon="true"
...
I added the daemon=3600 line in the ddclient.conf file, because it seems like /etc/default/ddclient uses that interval. I also set run_daemon="true" because I want this script to run every 3600 seconds (each hour). I don't know why I should do this, since it seems redundant to write the daemoon check interval in two config files.


I used journalctl -u ddclient.service and the output is:
Code:
-- Logs begin at Fri 2019-12-20 23:35:31 GMT, end at Sat 2019-12-21 21:59:01 GMT. --
Dec 21 21:24:52 raspberrypi systemd[1]: Starting LSB: Update dynamic domain name service entries...
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING:  file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30620]: WARNING:  file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING:  file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30622]: WARNING:  file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING:  skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:24:52 raspberrypi ddclient[30624]: WARNING:  skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:24:52 raspberrypi systemd[1]: Started LSB: Update dynamic domain name service entries.
Dec 21 21:24:52 raspberrypi ddclient[30627]: WARNING:  file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30629]: WARNING:  file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30631]: WARNING:  skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:28:16 raspberrypi systemd[1]: Stopping LSB: Update dynamic domain name service entries...
Dec 21 21:28:16 raspberrypi systemd[1]: ddclient.service: Succeeded.
The ddclient doesn't work. Checking the logs doesn't help since it shows a Success message always, even when it doesn't update the IP in the registrar:
Using
Code:
sudo ddclient -daemon=0 -noquiet -debug -verbose
to execute ddclient update without waiting for the daemoon interval, also shows success, but the IP is not updated.

These are my questions, if you are kind enough to answer them:
- Do I have to write the daemoon interval in the two config files ? Not just one of them ?
- Can I just set a crontab -e with sudo ddclient -daemon=0 -noquiet each 30 minutes, instead of using the daemoon ?
- Do you see any mistake in the files ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ddclient.conf - Multiple domain registrars? VaioSE Linux - Server 12 01-06-2014 03:33 PM
ddclient and ddclient.conf help to understand wolfsar Linux - Networking 8 12-28-2012 10:55 AM
How do I run the DDclient running Glenn D. Linux - Newbie 2 01-29-2010 05:50 AM
ddclient running for DynDNS account fails with "SIGTERM" stamcose Linux - Networking 1 12-13-2009 04:25 AM
About ddclient.conf satimis Linux - Server 4 03-18-2009 03:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration