- Update to version 1.4.75
- Move pidfile to /var/run/btsync dir - Use %%PORTNAME%% subs in rc file PR: ports/193676 Submitted by: maintainer
This commit is contained in:
parent
788fbfbdc6
commit
0a08b1e3a7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=368676
4 changed files with 17 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= btsync
|
||||
PORTVERSION= 1.3.109
|
||||
PORTVERSION= 1.4.75
|
||||
CATEGORIES= net-p2p
|
||||
MASTER_SITES= http://syncapp.bittorrent.com/${PORTVERSION}/
|
||||
DISTNAME= ${PORTNAME}_freebsd_${CONFIG_ARCH}-${PORTVERSION}
|
||||
|
@ -42,9 +42,10 @@ post-extract:
|
|||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/temp/btsync ${STAGEDIR}${PREFIX}/bin
|
||||
${WRKSRC}/temp/btsync --dump-sample-config > ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
||||
${REINPLACE_CMD} -e 's;\(^ *"storage_path" *: *\)"/.*",;\1"/var/db/${PORTNAME}",;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
||||
${REINPLACE_CMD} -e 's;^//\( *"storage_path" *: *\)"/.*",;\1"/var/db/${PORTNAME}",;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
||||
${REINPLACE_CMD} -e 's;^//\( *"pid_file" *: *"/var/run/${PORTNAME}/${PORTNAME}.pid",\);\1;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}/var/db/btsync
|
||||
${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SHA256 (btsync_freebsd_i386-1.3.109.tar.gz) = b451949b677d3aa006199164a7d7f9f799eb5b7758f96b0f2a5bbbb84a9a4aad
|
||||
SIZE (btsync_freebsd_i386-1.3.109.tar.gz) = 3279348
|
||||
SHA256 (btsync_freebsd_x64-1.3.109.tar.gz) = 31599871449dca3fbc464422fd31440d730cfb0ad11f05321e482ae7ed7f47df
|
||||
SIZE (btsync_freebsd_x64-1.3.109.tar.gz) = 3374894
|
||||
SHA256 (btsync_freebsd_i386-1.4.75.tar.gz) = 88262978b0c68406be93d0e98e9ffaff6fe73840195c63e43a846810eaa05e48
|
||||
SIZE (btsync_freebsd_i386-1.4.75.tar.gz) = 3543603
|
||||
SHA256 (btsync_freebsd_x64-1.4.75.tar.gz) = 3772d82c865a462ab47a8fad56e924a47eb0d0983aa23705d4a59ae3ad33c99b
|
||||
SIZE (btsync_freebsd_x64-1.4.75.tar.gz) = 3688773
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
# what you want it to be. It uses '%%GROUP%%'
|
||||
# group by default. Do not sets it as empty or it
|
||||
# will run as wheel.
|
||||
# %%PORTNAME%%_data_dir: Directory where %%PORTNAME%% configuration
|
||||
# data is stored.
|
||||
# Default: /var/db/%%PORTNAME%%
|
||||
|
||||
. /etc/rc.subr
|
||||
name="%%PORTNAME%%"
|
||||
|
@ -30,10 +27,16 @@ load_rc_config $name
|
|||
: ${%%PORTNAME%%_enable:="NO"}
|
||||
: ${%%PORTNAME%%_user:="%%USER%%"}
|
||||
: ${%%PORTNAME%%_group:="%%GROUP%%"}
|
||||
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
|
||||
|
||||
pidfile="$btsync_data_dir/sync.pid"
|
||||
pidfile="/var/run/%%PORTNAME%%/%%PORTNAME%%.pid"
|
||||
command="%%PREFIX%%/bin/btsync"
|
||||
command_args="--config %%PREFIX%%/etc/%%PORTNAME%%.conf"
|
||||
|
||||
start_precmd=%%PORTNAME%%_prestart
|
||||
%%PORTNAME%%_prestart(){
|
||||
if [ ! -d ${pidfile%/*} ]; then
|
||||
install -d -o $%%PORTNAME%%_user -g $%%PORTNAME%%_group ${pidfile%/*}
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@unexec %D/etc/rc.d/%%PORTNAME%% forcestop 2>/dev/null || true
|
||||
bin/btsync
|
||||
@sample etc/%%PORTNAME%%.conf.sample
|
||||
@unexec rmdir /var/db/btsync 2>/dev/null || true
|
||||
@unexec rmdir /var/db/%%PORTNAME%% 2>/dev/null || true
|
||||
@exec install -d -o %%USER%% -g %%GROUP%% /var/db/%%PORTNAME%%
|
||||
|
|
Loading…
Reference in a new issue