From 374252a55c14f92aaed73b3917ed783bf2762911 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sat, 26 Dec 2020 03:23:39 +0300 Subject: docs: update --- ...ng-up-an-rsync-repository-for-distribution.html | 109 --------------------- 1 file changed, 109 deletions(-) delete mode 100644 src/docs/Setting-up-an-rsync-repository-for-distribution.html (limited to 'src/docs/Setting-up-an-rsync-repository-for-distribution.html') diff --git a/src/docs/Setting-up-an-rsync-repository-for-distribution.html b/src/docs/Setting-up-an-rsync-repository-for-distribution.html deleted file mode 100644 index ff97a37..0000000 --- a/src/docs/Setting-up-an-rsync-repository-for-distribution.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - -Setting up an rsync repository for distribution (Carbs Linux User Manual) - - - - - - - - - - - - - - - - - -
-

-Up: Rsync Repositories   [Contents]

-
-
-

2.5.1 Setting up an rsync repository for distribution

- -

Carbs Linux repositories automatically sync from the git repostitories and serve -it through the rsync daemon. Here is a sample shell script that I use in order to -sync repositories. Feel free to customize for your own use. -

-
    #!/bin/sh
-    HOSTNAME="rsync://carbslinux.org/repo"
-    GITDIR="/pub/git/repo"
-    SHAREDIR="/pub/share/repo"
-    git -C "$GITDIR" pull
-
-    rsync -avcC --delete --include=core --exclude=.rsync,.rsync_root "$GITDIR/." "$SHAREDIR"
-
-    printf '%s\n' "$HOSTNAME" > "$GITDIR/.rsync"
-    for dir in "$GITDIR/"*; do
-        [ -d "$dir" ] || continue
-        [ -f "$dir/.rsync" ] ||
-        printf '%s/%s\n' "$HOSTNAME" "${dir##*/}" > "$dir/.rsync"
-        printf '..\n' > "$dir/.rsync_root"
-    done
-
-

You can then create an rsync user for serving the repositories. -

-
-
$ adduser -SD rsync
-
- -

Create /etc/rsyncd.conf and a service configuration as well. -

-
-    uid = rsync
-    gid = rsync
-    address = example.com
-    max connections = 10
-    use chroot = yes
-
-    [repo]
-        path = /pub/share/repo
-        comment = My repository
-
-

Create a service file at /etc/sv/rsync/run (runit): -

-
-
#!/bin/sh
-exec rsync --daemon --no-detach
-
- - - - - - - - - -- cgit v1.2.3