summaryrefslogtreecommitdiffstats
path: root/abs/extra/rslsync
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/rslsync')
-rw-r--r--abs/extra/rslsync/PKGBUILD64
-rw-r--r--abs/extra/rslsync/__changelog1
-rw-r--r--abs/extra/rslsync/rslsync.conf85
-rw-r--r--abs/extra/rslsync/rslsync.install53
-rw-r--r--abs/extra/rslsync/rslsync.service13
-rw-r--r--abs/extra/rslsync/rslsync.sysusers1
-rw-r--r--abs/extra/rslsync/rslsync.tmpfiles5
-rw-r--r--abs/extra/rslsync/rslsync_user.service11
8 files changed, 233 insertions, 0 deletions
diff --git a/abs/extra/rslsync/PKGBUILD b/abs/extra/rslsync/PKGBUILD
new file mode 100644
index 0000000..fc5b8ca
--- /dev/null
+++ b/abs/extra/rslsync/PKGBUILD
@@ -0,0 +1,64 @@
+# Contributor: Dalton Miller
+# Contributor: Kilian Lackhove kilian@lackhove.de
+# Contributor: Justin Patera serialhex@gmail.com
+# Contributor: ava1ar <mail(at)ava1ar(dot)me>
+# Maintainer: widowild
+
+pkgname=rslsync
+pkgver=2.7.0
+pkgrel=2
+pkgdesc="Resilio Sync (ex:BitTorrent Sync) - automatically sync files via secure, distributed technology"
+license=("custom:resilio")
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://www.getsync.com"
+install=rslsync.install
+backup=('etc/rslsync.conf')
+conflicts=()
+source=('rslsync.service'
+ 'rslsync_user.service'
+ 'rslsync.tmpfiles'
+ 'rslsync.sysusers'
+ 'rslsync.conf')
+source_arm=("rslsync_arm-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-arm/resilio-sync_arm.tar.gz")
+source_armv6h=("rslsync_arm-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-arm/resilio-sync_arm.tar.gz")
+source_armv7h=("rslsync_armhf-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-armhf/resilio-sync_armhf.tar.gz")
+source_aarch64=("rslsync_arm64-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-arm64/resilio-sync_arm64.tar.gz")
+source_i686=("rslsync_i386-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-i386/resilio-sync_i386.tar.gz")
+source_x86_64=("rslsync_x64-${pkgver}-${pkgrel}.tar.gz::https://download-cdn.resilio.com/stable/linux-x64/resilio-sync_x64.tar.gz")
+sha256sums=('4483cbe3fff81281666d8fbe8c9b8d7d27c38ba7a3d3752a865f1ab8c1f212db'
+ 'ba4b0ee3303027122e67345d4bf852f911a56f213f98c9eaa198c69d903fd8a1'
+ '58ba5cef05bcfde72c5841eaeffaa4d31c39e26902b5fefb2e17eb9b629416cf'
+ '3c69179987c2e0f54b2f3478ab421c65515f5b5b9bad2b6e055ec04aea0f5c6d'
+ '76e3b095ae35d5d7800928167e9a9b1662e257209c91f20e642eb009528d531c')
+sha256sums_i686=('8fce5f59ad0b083a413e5a16cc6e0200c966d12a39e0721964923ce1221d7e7b')
+sha256sums_x86_64=('ce1415403e089350bf6966af08d5822defd3e6d4a1cb902abc28d6f7fc247c9f')
+sha256sums_arm=('bf1242a271c9ad23b0a34f247860981c8de8686ebd1300c1073513a4bfdf5188')
+sha256sums_armv6h=('bf1242a271c9ad23b0a34f247860981c8de8686ebd1300c1073513a4bfdf5188')
+sha256sums_armv7h=('d4123febd2e463b64fbe4ac42151f2c4cab1a7d549ade8fe994a38b593c8c23b')
+sha256sums_aarch64=('c4780cbbcd77a5d9cb023050e29a82216c0cebc37564349bff7edc0eccdba533')
+
+
+package() {
+ # install main binary
+ install -D -m 755 "${srcdir}"/rslsync "${pkgdir}"/usr/bin/rslsync
+
+ # generate and install system-wide config
+ mkdir -p "${pkgdir}"/etc
+ ./rslsync --dump-sample-config \
+ | sed 's:/home/user/\.sync:/var/lib/rslsync:' \
+ | sed 's:\/\/ "pid_file": "pid_file":' \
+ | sed 's:\/\/ "storage_path": "storage_path":' \
+ | sed 's/\/var\/run\/resilio/\/run\/resilio/g' \
+ > "${pkgdir}"/etc/rslsync.conf
+
+ # install systemd config files
+ install -D -m 644 "${srcdir}"/rslsync.service "${pkgdir}"/usr/lib/systemd/system/rslsync.service
+ install -D -m 644 "${srcdir}"/rslsync.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/rslsync.conf
+ install -D -m 644 "${srcdir}"/rslsync_user.service "${pkgdir}"/usr/lib/systemd/user/rslsync.service
+ install -D -m 644 "${srcdir}/rslsync.sysusers" "${pkgdir}/usr/lib/sysusers.d/rslsync.conf"
+
+ # install license
+ install -D -m 644 "${srcdir}"/LICENSE.TXT "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
+
+ install -D -m 644 "${srcdir}"/rslsync.conf "${pkgdir}"/etc/rslsync.conf
+}
diff --git a/abs/extra/rslsync/__changelog b/abs/extra/rslsync/__changelog
new file mode 100644
index 0000000..8d32241
--- /dev/null
+++ b/abs/extra/rslsync/__changelog
@@ -0,0 +1 @@
+PKGBUILD: add modified /etc/rslsync.conf
diff --git a/abs/extra/rslsync/rslsync.conf b/abs/extra/rslsync/rslsync.conf
new file mode 100644
index 0000000..7968aa4
--- /dev/null
+++ b/abs/extra/rslsync/rslsync.conf
@@ -0,0 +1,85 @@
+{
+ "device_name": "My Sync Device",
+// "listening_port" : 0, // 0 - randomize port
+
+/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in current working directory */
+ "storage_path" : "/data/storage/disk0/media/resilio/.sync",
+
+/* set location of pid file */
+// "pid_file" : "/run/resilio/resilio.pid",
+
+/* use UPnP for port mapping */
+ "use_upnp" : true,
+
+/* limits in kB/s. 0 - no limit */
+ "download_limit" : 0,
+ "upload_limit" : 0,
+
+/* proxy configuration */
+// "proxy_type" : "socks4", // Valid types: "socks4", "socks5", "http_connect". Any other value means no proxy
+// "proxy_addr" : "192.168.1.2", // IP address of proxy server.
+// "proxy_port" : 1080,
+// "proxy_auth" : false, // Use authentication for proxy. Note: only username/password for socks5 (RFC 1929) is supported, and it is not really secure
+// "proxy_username" : "user",
+// "proxy_password" : "password",
+
+/* directory_root path defines where the WebUI Folder browser starts (linux only). Default value is / */
+ "directory_root" : "/data/storage/",
+
+/* directory_root_policy defines how directory_root is used (linux only).
+ Valid values are:
+ "all" - accepts directory_root and its subdirectories for 'getdir' and 'adddir' actions
+ "belowroot" - accepts directory_root's subdirectories for 'getdir' and 'adddir' actions,
+ but denies attempts to use 'adddir' to create directories directly within directory_root
+ Default value is "all". */
+// "directory_root_policy" : "all",
+
+ "webui" :
+ {
+ "listen" : "0.0.0.0:8888" // remove field to disable WebUI
+
+/* preset credentials. Use password or password_hash */
+// ,"login" : "admin"
+// ,"password" : "password" // (not recommended, better use 'password_hash_unified')
+// ,"password_hash" : "<crypt() 3 format password hash>" // (not recommended) Works on *nix only!
+// Use either 'password_hash' or 'password_hash_unified' (recommended), but not both of them!
+// ,"password_hash_unified" : "<SHA2-256 hash in HEX format>" // Works on all platforms.
+// ,"password_hash_salt_unified" : "<any text>" // Salt for unified password's hash. Works on all platforms.
+// ,"allow_empty_password" : false // Defaults to true
+/* ssl configuration */
+// ,"force_https" : true // disable http
+// ,"ssl_certificate" : "/path/to/cert.pem"
+// ,"ssl_private_key" : "/path/to/private.key"
+
+/* dir_whitelist defines which directories can be shown to user or have folders added (linux only)
+ relative paths are relative to directory_root setting */
+// ,"dir_whitelist" : [ "/home/user/MySharedFolders/personal", "work" ]
+ }
+
+/* !!! if you set shared folders in config file WebUI will be DISABLED !!!
+ shared directories specified in config file override the folders previously added from WebUI. */
+/*,
+ "shared_folders" :
+ [
+ {
+ "secret" : "MY_SECRET_1", // required field - use --generate-secret in command line to create new secret
+ "dir" : "/home/user/resilio/sync_test", // * required field
+ "use_relay_server" : true, // use relay server when direct connection fails
+ "use_tracker" : true,
+ "search_lan" : true,
+ "use_sync_trash" : true, // enable SyncArchive to store files deleted on remote devices
+ "overwrite_changes" : false, // restore modified files to original version, ONLY for Read-Only folders
+ "selective_sync" : false, // add folder in selective sync mode
+ "known_hosts" : // specify hosts to attempt connection without additional search
+ [
+ "192.168.1.2:44444"
+ ]
+ }
+ ]
+*/
+
+/* Advanced preferences can be added to config file. Info is available at "https://help.getsync.com/hc/en-us/articles/207371636"
+For example see folder_rescan_interval below */
+//, "folder_rescan_interval" : 600
+
+}
diff --git a/abs/extra/rslsync/rslsync.install b/abs/extra/rslsync/rslsync.install
new file mode 100644
index 0000000..a64f8ce
--- /dev/null
+++ b/abs/extra/rslsync/rslsync.install
@@ -0,0 +1,53 @@
+post_install() {
+ post_upgrade
+}
+
+post_upgrade() {
+cat << EOF
+ WebGUI can be accessed via following URL: http://localhost:8888
+
+ * Running rslsync system instance (using dedicated rslsync:rslsync account)
+
+ System instance of rslsync is preconfigured (configuration file located
+ at /etc/rslsync.conf) and can be used directly after installation.
+
+ Execute:
+
+ to reload system systemd modules: systemctl daemon-reload
+ to start rslsync manually: systemctl start rslsync
+ to autostart rslsync on system start: systemctl enable rslsync
+
+ * Running rslsync user instance (using current user account)
+
+ User instance MUST be configured before use. To perform configuration,
+ install rslsync-autoconfig package or follow manual configuration steps:
+
+ 1. Copy /etc/rslsync/rslsync.conf to ~/.config/rslsync/rslsync.conf for
+ the user you wish to configure rslsync:
+
+ mkdir -p ~/.config/rslsync
+ cp /etc/rslsync.conf ~/.config/rslsync/rslsync.conf
+
+ 2. Replace user-specific references with the appropriate information,
+ including the following settings:
+
+ - storage_path
+ - pid_file
+ - webui.listen
+ - webui.login
+ - webui.password
+
+ 3. Make sure folder you specified as storage_path and folder where pid_file will
+ be located both exist in the filesystem, since rslsync will not create it for you.
+
+ Execute:
+
+ to reload user systemd modules: systemctl --user daemon-reload
+ to start rslsync manually: systemctl --user start rslsync
+ to autostart rslsync on user login: systemctl --user enable rslsync
+EOF
+}
+
+post_remove() {
+ echo -e "Please remove /var/lib/rslsync folder manually"
+}
diff --git a/abs/extra/rslsync/rslsync.service b/abs/extra/rslsync/rslsync.service
new file mode 100644
index 0000000..8d918ee
--- /dev/null
+++ b/abs/extra/rslsync/rslsync.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Resilio Sync service
+After=network.target
+
+[Service]
+Type=simple
+User=rslsync
+Group=rslsync
+ExecStart=/usr/bin/rslsync --nodaemon --config /etc/rslsync.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/abs/extra/rslsync/rslsync.sysusers b/abs/extra/rslsync/rslsync.sysusers
new file mode 100644
index 0000000..56b7b07
--- /dev/null
+++ b/abs/extra/rslsync/rslsync.sysusers
@@ -0,0 +1 @@
+u rslsync - "rslsync daemon" /var/lib/rslsync
diff --git a/abs/extra/rslsync/rslsync.tmpfiles b/abs/extra/rslsync/rslsync.tmpfiles
new file mode 100644
index 0000000..5eee572
--- /dev/null
+++ b/abs/extra/rslsync/rslsync.tmpfiles
@@ -0,0 +1,5 @@
+# Override this file with a modified version in /etc/tmpfiles.d/
+D /run/resilio 0755 rslsync rslsync -
+d /var/lib/rslsync 0755 rslsync rslsync
+Z /var/lib/rslsync - rslsync rslsync
+z /etc/rslsync.conf 0600 rslsync rslsync
diff --git a/abs/extra/rslsync/rslsync_user.service b/abs/extra/rslsync/rslsync_user.service
new file mode 100644
index 0000000..e5809b7
--- /dev/null
+++ b/abs/extra/rslsync/rslsync_user.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Resilio Sync per-user service
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/rslsync --nodaemon --config %h/.config/rslsync/rslsync.conf
+Restart=on-abort
+
+[Install]
+WantedBy=default.target