guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#32141] [PATCH] services: Add ddclient service.


From: Oleg Pykhalov
Subject: [bug#32141] [PATCH] services: Add ddclient service.
Date: Wed, 25 Jul 2018 10:22:50 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello Ludovic,

Thank you for review.

address@hidden (Ludovic Courtès) writes:

> Oleg Pykhalov <address@hidden> skribis:
>
>> * gnu/services/dns.scm (ddclient-configuration, 
>> opaque-ddclient-configuration,
>> ddclient-service-type): New variables.
>> (uglify-field-name, serialize-field, serialize-boolean, serialize-integer,
>> 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.
>
> [...]
>
>> address@hidden ddclient Service
>> +
>> address@hidden ddclient
>> address@hidden://sourceforge.net/projects/ddclient/, ddclient} is an address
>> +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 “such as @uref{https://dyn.com/dns/,
Dyn}.” 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 ‘curl -Ik --location http://ddclient.sf.net/’ returns 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/ddclient.conf"
>> +                           "-debug" "-verbose")
>> +                     #:pid-file #$pid
>> +                     #:environment-variables
>> +                     (list "SSL_CERT_DIR=/run/current-system/profile\
>> +/etc/ssl/certs"
>> +                           "SSL_CERT_FILE=/run/current-system/profile\
>> +/etc/ssl/certs/ca-certificates.crt")))
>> +           (stop #~(make-kill-destructor))))))
>
> Does it run as root?  If there’s no option to run it (mostly) as
> non-root, perhaps it would make sense to try using
> ‘make-forkexec-constructor/container’ here (as a separate patch.)
>
> WDYT?

It did run as root.  I've succeeded to run it with ‘ddclient’ user.


Also, the generated ‘ddclient.conf’ which contains secrets is stored in
the store.  I probably should change the ‘ddclient-activation’ procedure

--8<---------------cut here---------------start------------->8---
(copy-file #$(plain-file "ddclient.conf" config-str) file)
--8<---------------cut here---------------end--------------->8---

to a procedure which writes ‘config-str’ to the file without storing it
somewhere else.  WDYT?


[1]  https://packages.debian.org/stretch/ddclient

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]