From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiE9V-0006SE-GZ for guix-patches@gnu.org; Wed, 25 Jul 2018 03:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiE9S-0006Ys-Gr for guix-patches@gnu.org; Wed, 25 Jul 2018 03:24:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiE9S-0006YI-Bg for guix-patches@gnu.org; Wed, 25 Jul 2018 03:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fiE9S-0002DG-5A for guix-patches@gnu.org; Wed, 25 Jul 2018 03:24:02 -0400 Subject: [bug#32141] [PATCH] services: Add ddclient service. In-Reply-To: <20180713145854.12250-1-go.wigust@gmail.com> Resent-Message-ID: From: Oleg Pykhalov References: <20180713145854.12250-1-go.wigust@gmail.com> <87lga7wokr.fsf@gnu.org> Date: Wed, 25 Jul 2018 10:22:50 +0300 Message-ID: <87effrpynp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 32141@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ludovic, Thank you for review. ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Oleg Pykhalov skribis: > >> * gnu/services/dns.scm (ddclient-configuration, opaque-ddclient-configur= ation, >> ddclient-service-type): New variables. >> (uglify-field-name, serialize-field, serialize-boolean, serialize-intege= r, >> serialize-string, serialize-list, serialize-extra-options, >> ddclient-activation, ddclient-shepherd-service, >> generate-ddclient-documentation, generate-opaque-ddclient-documentation)= : New >> procedures. >> * doc/guix.texi (DNS Services): Document it. > > [...] > >> +@subsubheading ddclient Service >> + >> +@cindex ddclient >> +@uref{https://sourceforge.net/projects/ddclient/, ddclient} is an addre= ss >> +updating utility for dynamic DNS services. > > It would be nice to expound a bit, like: > > The ddclient service described below runs the ddclient daemon, which > takes care of automatically updating DNS entries for service providers > such as DynDNS.com. OK. I improved little bit with =E2=80=9Csuch as @uref{https://dyn.com/dns/, Dyn}.=E2=80=9D if you don't mind. > Also, is there a better home page? I think no. I found http://ddclient.sf.net/ in Debian package recipe [1], but =E2=80=98curl -Ik --location http://ddclient.sf.net/=E2=80=99 retu= rns a https://sourceforge.net/p/ddclient/wiki/Home/ URI. > Otherwise LGTM! > >> + (list (shepherd-service >> + (provision '(ddclient)) >> + (documentation "Run ddclient daemon.") >> + (start #~(make-forkexec-constructor >> + (list #$(file-append ddclient "/bin/ddclient") >> + "-foreground" "-file" "/etc/ddclient/ddclien= t.conf" >> + "-debug" "-verbose") >> + #:pid-file #$pid >> + #:environment-variables >> + (list "SSL_CERT_DIR=3D/run/current-system/profile\ >> +/etc/ssl/certs" >> + "SSL_CERT_FILE=3D/run/current-system/profile\ >> +/etc/ssl/certs/ca-certificates.crt"))) >> + (stop #~(make-kill-destructor)))))) > > Does it run as root? If there=E2=80=99s no option to run it (mostly) as > non-root, perhaps it would make sense to try using > =E2=80=98make-forkexec-constructor/container=E2=80=99 here (as a separate= patch.) > > WDYT? It did run as root. I've succeeded to run it with =E2=80=98ddclient=E2=80= =99 user. Also, the generated =E2=80=98ddclient.conf=E2=80=99 which contains secrets = is stored in the store. I probably should change the =E2=80=98ddclient-activation=E2=80= =99 procedure =2D-8<---------------cut here---------------start------------->8--- (copy-file #$(plain-file "ddclient.conf" config-str) file) =2D-8<---------------cut here---------------end--------------->8--- to a procedure which writes =E2=80=98config-str=E2=80=99 to the file withou= t storing it somewhere else. WDYT? [1] https://packages.debian.org/stretch/ddclient --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAltYJUoACgkQckbhHGm3 lWkZMg/9FqkHR1HVU5XQpN/+YD0QJJ00oRu34OGb3pA7nXZiMYKf0+RoGbDUWu74 6e+pHcRhDmxiZt2w4lkqSDq2J3Ge3MdaJBfUDmGVYkszyi30tbavxgleWqz4U69u wTMPpMrSDk4nQzaKRvtTEx32J9K7q8Hfz4/njv9hnYrtazsmBz6hNicDcvcJD8vi Naj3E75pGVInup5uj9yGaKQsjZzaRroAMp/5qAAmdWO4wSMO3E0qczkH+9EuNgQV DalwA2zhd4P4OYp3PUXeCQpbWXKiEDFoR+lD1go6jKLBieXHw2c37tZ+pQB37ba2 mfYBW67D7vToGWc/HvEFkBL7MDEHPnB4lY+IR28e4U6eBMREH8wEwflup0+7omjP BlLz9gGpDezcsJ99Wgzj+kR89lCcgR1EX7u4iS/EB5EJxgIBb7Iq9tp3Bbe7S72O 4YvY1zu4thIvDGmnAB5C2XQXp9zI60DbZSEd98kJPT5ZhUogzOfFrnCcLxtSRwty /Rr0k36rLuQTQrrsjPGkFiJm4ljpuj+RuqSDm7YxXqXxH4ngT10JMLK87aE2LsMG oMbDlHpGmSsMhgmDUop5gJdFl7X5+AFrWkbOi9jeyDpr9QzkTyRsQjXBwBjooOkz l20uSDex2vTojuUCd/0ZYf9qPmL5HOonjxAl+wcO2nnr2YiMlUk= =UF5x -----END PGP SIGNATURE----- --=-=-=--