btsync: use btsync account, use make_dirs, fix typo
This commit is contained in:
parent
59337ee5df
commit
0b99e87c96
@ -17,12 +17,12 @@ post)
|
|||||||
}
|
}
|
||||||
cp $BUILD_DIR/btsync "usr/bin/btsync"
|
cp $BUILD_DIR/btsync "usr/bin/btsync"
|
||||||
mkdir -p etc
|
mkdir -p etc
|
||||||
./$BUILD_DIR/btsync --dump-sample-config \
|
if [ ! -f etc/btsync.conf ]; then
|
||||||
| sed 's:/home/user/\.sync:/var/lib/btsync:' \
|
./$BUILD_DIR/btsync --dump-sample-config \
|
||||||
| sed 's:btsync/btsync.pid:btsync.pid:' \
|
| sed 's:/home/user/\.sync:/var/lib/btsync:' \
|
||||||
| sed 's:\/\/ "pid_file": "pid_file":' \
|
| sed 's:\/\/ "pid_file": "pid_file":' \
|
||||||
| sed 's:\/\/ "storage_path": "storage_path":' \
|
| sed 's:\/\/ "storage_path": "storage_path":' \
|
||||||
> "etc/btsync.conf"
|
> "etc/btsync.conf"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
@ -1,2 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec btsync --nodaemon --config /etc/btsync.conf
|
mkdir -p /run/btsync
|
||||||
|
chown -R btsync:btsync /run/btsync
|
||||||
|
exec chpst -u btsync:btsync btsync --nodaemon --config /etc/btsync.conf 2>&1
|
||||||
|
@ -4,7 +4,7 @@ revision=1
|
|||||||
repository=nonfree
|
repository=nonfree
|
||||||
short_desc="Automatically sync files via secure, distributed technology"
|
short_desc="Automatically sync files via secure, distributed technology"
|
||||||
maintainer="Juhani Imberg <juhani@imberg.fi>"
|
maintainer="Juhani Imberg <juhani@imberg.fi>"
|
||||||
license="Propietary license"
|
license="Proprietary license"
|
||||||
homepage="https://www.getsync.com"
|
homepage="https://www.getsync.com"
|
||||||
|
|
||||||
case "${XBPS_TARGET_MACHINE}" in
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
@ -27,6 +27,8 @@ distfiles="https://download-cdn.getsyncapp.com/${version}/linux-${_type}/${_file
|
|||||||
checksum="$_hash"
|
checksum="$_hash"
|
||||||
skip_extraction=$_filename
|
skip_extraction=$_filename
|
||||||
create_wrksrc=yes
|
create_wrksrc=yes
|
||||||
|
system_accounts="btsync"
|
||||||
|
make_dirs="/var/lib/btsync 0770 ${system_accounts} ${system_accounts}"
|
||||||
|
|
||||||
do_fetch() {
|
do_fetch() {
|
||||||
mkdir -p $wrksrc
|
mkdir -p $wrksrc
|
||||||
@ -53,8 +55,5 @@ do_install() {
|
|||||||
|
|
||||||
vlicense "${FILESDIR}/LICENSE"
|
vlicense "${FILESDIR}/LICENSE"
|
||||||
|
|
||||||
vmkdir var/lib/btsync
|
|
||||||
touch ${DESTDIR}/var/lib/btsync/.keep
|
|
||||||
|
|
||||||
vsv btsync
|
vsv btsync
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user