[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27855] [PATCH] gnu: Add rsync service.
From: |
Oleg Pykhalov |
Subject: |
[bug#27855] [PATCH] gnu: Add rsync service. |
Date: |
Thu, 03 Aug 2017 18:29:52 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
And I probably need to add this patch too.
>From 468ebe35b2a2c75752661d1591d9e7f387aff83e Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <address@hidden>
Date: Thu, 3 Aug 2017 18:28:03 +0300
Subject: [PATCH] services: rsync: Clean up code.
* gnu/services/rsync.scm: Clean up.
---
gnu/services/rsync.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm
index e1a014a63..0612a0ea6 100644
--- a/gnu/services/rsync.scm
+++ b/gnu/services/rsync.scm
@@ -69,12 +69,13 @@
(define (rsync-account config)
"Return the user accounts and user groups for CONFIG."
- (let ((rsync-user (rsync-configuration-user config)))
+ (let ((rsync-user (rsync-configuration-user config))
+ (rsync-group (rsync-configuration-group config)))
(list (user-group (name "rsyncd") (system? #t))
(user-account
(name rsync-user)
(system? #t)
- (group rsync-user)
+ (group rsync-group)
(comment "rsyncd privilege separation user")
(home-directory "/var/run/rsyncd")
(shell #~(string-append #$shadow "/sbin/nologin"))))))
@@ -84,11 +85,12 @@
#~(begin
(use-modules (guix build utils))
(let ((share-directory #$(rsync-configuration-share-path config))
- (user (getpw #$(rsync-configuration-user config))))
+ (user (getpw #$(rsync-configuration-user config)))
+ (group (getpw #$(rsync-configuration-group config))))
(and=> share-directory mkdir-p)
(chown share-directory
(passwd:uid user)
- (group:gid user)))))
+ (group:gid group)))))
(define (rsync-config-file config)
"Return the rsync configuration file corresponding to CONFIG."
@@ -115,7 +117,8 @@
(let* ((rsync (rsync-configuration-package config))
(pid-file (rsync-configuration-pid-file config))
(port (rsync-configuration-port-number config))
- (user (if (> port 1024) (rsync-configuration-user config) "root")))
+ (user (if (> port 1024) (rsync-configuration-user config) "root"))
+ (group (if (> port 1024) (rsync-configuration-group config) "root")))
(list (shepherd-service
(provision '(rsync))
(documentation "Run rsync daemon.")
@@ -125,7 +128,7 @@
"--daemon")
#:pid-file #$pid-file
#:user #$user
- #:group #$user))
+ #:group #$group))
(stop #~(make-kill-destructor))))))
(define rsync-service-type
--
2.13.3
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/03
- [bug#27855] [PATCH] gnu: Add rsync service.,
Oleg Pykhalov <=
- [bug#27855] [PATCH] gnu: Add rsync service., Christopher Baines, 2017/08/03
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/03
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/03
- [bug#27855] [PATCH] gnu: Add rsync service., Christopher Baines, 2017/08/10
- [bug#27855] [PATCH] gnu: Add rsync service., Christopher Baines, 2017/08/10
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/10
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/11
- [bug#27855] [PATCH] gnu: Add rsync service., Christopher Baines, 2017/08/12
- [bug#27855] [PATCH] gnu: Add rsync service., Oleg Pykhalov, 2017/08/12
- [bug#27855] [PATCH] gnu: Add rsync service., Christopher Baines, 2017/08/12