aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/rsync.scm
diff options
context:
space:
mode:
authorJacob Adams <jacob@tookmund.com>2021-09-26 13:31:31 -0400
committerLudovic Courtès <ludo@gnu.org>2021-10-25 14:32:59 +0200
commit1ea032fb5fc8dd6f7a10e5bc705e526d25fbe1b4 (patch)
treeda24969f4f1d3f91a85b3a493e4d5d1a194a7f44 /gnu/services/rsync.scm
parent69b249ecaeb1aa1de1d00c187eb21905eb5c7ca6 (diff)
downloadguix-1ea032fb5fc8dd6f7a10e5bc705e526d25fbe1b4.tar
guix-1ea032fb5fc8dd6f7a10e5bc705e526d25fbe1b4.tar.gz
services: rsync: support binding rsync to a specific IP address
* gnu/services/rsync.scm (<rsync-configuration>)[address]: New field. (rsync-config-file): Honor it. * doc/guix.texi (Networking Services): Document new address rsync configuration option. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services/rsync.scm')
-rw-r--r--gnu/services/rsync.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm
index 6c117bbda4..59faed78f6 100644
--- a/gnu/services/rsync.scm
+++ b/gnu/services/rsync.scm
@@ -45,6 +45,8 @@
rsync-configuration?
(package rsync-configuration-package ; package
(default rsync))
+ (address rsync-configuration-address ; string | #f
+ (default #f))
(port-number rsync-configuration-port-number ; integer
(default 873))
(pid-file rsync-configuration-pid-file ; string
@@ -110,7 +112,7 @@
(define rsync-config-file
;; Return the rsync configuration file corresponding to CONFIG.
(match-lambda
- (($ <rsync-configuration> package port-number pid-file lock-file log-file
+ (($ <rsync-configuration> package address port-number pid-file lock-file log-file
use-chroot? share-path share-comment read-only?
timeout user group uid gid)
(if (not (string=? user "root"))
@@ -132,6 +134,7 @@
"pid file = " pid-file "\n"
"lock file = " lock-file "\n"
"log file = " log-file "\n"
+ (if address (string-append "address = " address "\n") "")
"port = " (number->string port-number) "\n"
"use chroot = " (if use-chroot? "true" "false") "\n"
(if uid (string-append "uid = " uid "\n") "")