diff --git a/srcpkgs/btsync/INSTALL b/srcpkgs/btsync/INSTALL index 6248d17de10..5359bb2eb27 100644 --- a/srcpkgs/btsync/INSTALL +++ b/srcpkgs/btsync/INSTALL @@ -17,12 +17,12 @@ post) } cp $BUILD_DIR/btsync "usr/bin/btsync" mkdir -p etc - ./$BUILD_DIR/btsync --dump-sample-config \ - | sed 's:/home/user/\.sync:/var/lib/btsync:' \ - | sed 's:btsync/btsync.pid:btsync.pid:' \ - | sed 's:\/\/ "pid_file": "pid_file":' \ - | sed 's:\/\/ "storage_path": "storage_path":' \ - > "etc/btsync.conf" - + if [ ! -f etc/btsync.conf ]; then + ./$BUILD_DIR/btsync --dump-sample-config \ + | sed 's:/home/user/\.sync:/var/lib/btsync:' \ + | sed 's:\/\/ "pid_file": "pid_file":' \ + | sed 's:\/\/ "storage_path": "storage_path":' \ + > "etc/btsync.conf" + fi ;; esac \ No newline at end of file diff --git a/srcpkgs/btsync/files/btsync/run b/srcpkgs/btsync/files/btsync/run index 531e8b547f7..1c0fbd71bf0 100644 --- a/srcpkgs/btsync/files/btsync/run +++ b/srcpkgs/btsync/files/btsync/run @@ -1,2 +1,4 @@ #!/bin/sh -exec btsync --nodaemon --config /etc/btsync.conf \ No newline at end of file +mkdir -p /run/btsync +chown -R btsync:btsync /run/btsync +exec chpst -u btsync:btsync btsync --nodaemon --config /etc/btsync.conf 2>&1 diff --git a/srcpkgs/btsync/template b/srcpkgs/btsync/template index f692d1a320e..7ecf61c512c 100644 --- a/srcpkgs/btsync/template +++ b/srcpkgs/btsync/template @@ -4,7 +4,7 @@ revision=1 repository=nonfree short_desc="Automatically sync files via secure, distributed technology" maintainer="Juhani Imberg " -license="Propietary license" +license="Proprietary license" homepage="https://www.getsync.com" case "${XBPS_TARGET_MACHINE}" in @@ -27,6 +27,8 @@ distfiles="https://download-cdn.getsyncapp.com/${version}/linux-${_type}/${_file checksum="$_hash" skip_extraction=$_filename create_wrksrc=yes +system_accounts="btsync" +make_dirs="/var/lib/btsync 0770 ${system_accounts} ${system_accounts}" do_fetch() { mkdir -p $wrksrc @@ -53,8 +55,5 @@ do_install() { vlicense "${FILESDIR}/LICENSE" - vmkdir var/lib/btsync - touch ${DESTDIR}/var/lib/btsync/.keep - vsv btsync }