summaryrefslogtreecommitdiff
path: root/devobsserver/script/rsync.sh
blob: 5b8a402108a9dd65d7e849b97629093ebd1664a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash -x
#===============================================================================
# Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
# Author onstudy@samsung.com
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 2 of the License
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#===============================================================================
### ADD PERMISSION TO KVM ####
RSYNC_HOST_ALLOWS=${RSYNC_HOST_ALLOWS:-*}

[ -f /etc/rsyncd.conf ] || cat <<EOF > /etc/rsyncd.conf
gid = nobody
read only = true
use chroot = true
transfer logging = false
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
#pid file = /var/run/rsyncd.pid
slp refresh = 300
use slp = false

[_build_R_]
        path = /srv/obs/build
        comment = "get build log to directory"
        uid = obsrun
        gid = obsrun
        read only = true
        use chroot = true
        hosts allow = ${RSYNC_HOST_ALLOWS}
        list = false
        incoming chmod = a=r,D+x
EOF