diff options
Diffstat (limited to 'devobsserver/script/rsync.sh')
-rwxr-xr-x | devobsserver/script/rsync.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/devobsserver/script/rsync.sh b/devobsserver/script/rsync.sh new file mode 100755 index 0000000..5b8a402 --- /dev/null +++ b/devobsserver/script/rsync.sh @@ -0,0 +1,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 + + + + |