From ab9da50b90330faa666ac02e399b094935b7df85 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Wed, 24 Feb 2016 15:13:39 -0600 Subject: [PATCH] Daemonize ddclient --- configure_ddclient.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure_ddclient.sh b/configure_ddclient.sh index 4c3da97..a7b2c83 100644 --- a/configure_ddclient.sh +++ b/configure_ddclient.sh @@ -27,7 +27,8 @@ if [ "$run_start" = "y" ]; then echo "Enter the company identifier:" read company_ident - echo "protocol=dyndns2" > ddclient.conf + echo "daemon=3600" > ddclient.conf + echo "protocol=dyndns2" >> ddclient.conf echo "use=web" >> ddclient.conf echo "server=domains.google.com" >> ddclient.conf echo "ssl=yes" >> ddclient.conf @@ -35,8 +36,13 @@ if [ "$run_start" = "y" ]; then echo "password=$password" >> ddclient.conf echo "$well_name.$company_ident.poconsole.net" >> ddclient.conf + echo "Good work, class! Let's apply the settings!" mv ddclient.conf /etc/ - ddclient > ddclient.log + sed -i 's/run_daemon="false"/run_daemon="true"/g' /etc/default/ddclient + sed -i 's/daemon_interval="300"/daemon_interval="3600"/g' /etc/default/ddclient + /etc/init.d/ddclient start + /etc/init.d/ddclient status > ddclient.log + cat ddclient.log else echo "Your loss... I was going to do some cool stuff..."