net/syncthing-discosrv: update to latest, fix rc script

PR:		203987
Reported by:	wraul@dbox.se
This commit is contained in:
Steve Wills 2015-11-20 15:23:23 +00:00
parent a0753abc2b
commit 74436bb5f4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=402089
4 changed files with 38 additions and 8 deletions

View File

@ -2,18 +2,18 @@
# $FreeBSD$
PORTNAME= syncthing-discosrv
PORTVERSION= 0.0.0.2015092201
PORTVERSION= 0.12.2
DISTVERSIONPREFIX= v
CATEGORIES= net
MAINTAINER= swills@FreeBSD.org
COMMENT= Discovery server for syncthing
BUILD_DEPENDS= go>=1.5:${PORTSDIR}/lang/go
BUILD_DEPENDS= go:${PORTSDIR}/lang/go
USE_GITHUB= yes
GH_ACCOUNT= syncthing
GH_PROJECT= discosrv
GH_TAGNAME= 2062f77
PLIST_FILES= bin/syncthing-discosrv
@ -25,7 +25,7 @@ STRIP= # stripping can break go binaries
do-build:
@cd ${WRKSRC} ; ${SETENV} GOPATH=${WRKSRC}/Godeps/_workspace:${WRKSRC} go build
@${MV} ${WRKSRC}/discosrv-${GH_TAGNAME} ${WRKSRC}/syncthing-discosrv
@${MV} ${WRKSRC}/discosrv-${PORTVERSION} ${WRKSRC}/syncthing-discosrv
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/syncthing-discosrv ${STAGEDIR}${PREFIX}/bin/

View File

@ -1,2 +1,2 @@
SHA256 (syncthing-discosrv-0.0.0.2015092201-2062f77_GH0.tar.gz) = ceed277b47d303898eda1c4fad520343252e7d058daf75405522468af091fc0e
SIZE (syncthing-discosrv-0.0.0.2015092201-2062f77_GH0.tar.gz) = 969977
SHA256 (syncthing-discosrv-v0.12.2_GH0.tar.gz) = 429632dd1d6bd61f41ba3288e78bdd9a5ab0be00013f9f061e5affeccf6266b1
SIZE (syncthing-discosrv-v0.12.2_GH0.tar.gz) = 970007

View File

@ -17,6 +17,12 @@
# Default is "syncthing".
# syncthingdiscosrv_dir (dir): Set dir to run syncthing-discosrv in.
# Default is "/var/db/syncthing-discosrv".
# syncthingdiscosrv_key (file): Set key file to use
# Default is "${syncthingdiscosrv_dir}/syncthing.key".
# syncthingdiscosrv_cert (file): Set cert file to use
# Default is "${syncthingdiscosrv_dir}/syncthing.cert".
# syncthingdiscosrv_args (string): Extra args to pass to syncthing-discosrv
# Default is ""
. /etc/rc.subr
@ -29,13 +35,15 @@ load_rc_config $name
: ${syncthingdiscosrv_user:="syncthing"}
: ${syncthingdiscosrv_group:="syncthing"}
: ${syncthingdiscosrv_dir:="/var/db/syncthing-discosrv"}
: ${syncthingdiscosrv_key:="${syncthingdiscosrv_dir}/syncthing.key"}
: ${syncthingdiscosrv_cert:="${syncthingdiscosrv_dir}/syncthing.cert"}
export STNORESTART=true
pidfile=/var/run/syncthingdiscosrv.pid
procname="%%PREFIX%%/bin/syncthing-discosrv"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${procname} -db-dir=${syncthingdiscosrv_dir}/db -stats-file=${syncthingdiscosrv_dir}/stats ${syncthingdiscosrv_flags}"
command_args="-f -p ${pidfile} ${procname} -key ${syncthingdiscosrv_key} -cert ${syncthingdiscosrv_cert} ${syncthingdiscosrv_args}"
start_precmd=syncthingdiscosrv_startprecmd

View File

@ -1,5 +1,27 @@
WARNING: This version is not backwards compatible with 0.10.x releases!
WARNING: This version is not backwards compatible with 0.11.x or older
releases!
For more information, please read:
https://forum.syncthing.net/t/syncthing-v0-11-0-release-notes/2426
https://forum.syncthing.net/t/syncthing-syncthing-v0-12-0-beryllium-bedbug/6026
WARNING: This version requires cert and key files. You must supply a TLS key
and cert. The service will not start without these files. The default key/cert
files are:
/var/db/syncthing-discosrv/syncthing.key
/var/db/syncthing-discosrv/syncthing.cert
You may specify the location by adding these lines to /etc/rc.conf:
syncthingdiscosrv_key="/path/to/your/key"
syncthingdiscosrv_cert="/path/to/your/cert"
WARNING: The database is no longer automatically persisted to disk. You may
persist it to disk by adding this line to /etc/rc.conf:
syncthingdiscosrv_args="-db-dsn=file:///var/db/syncthing-discosrv/discosrv.db"
NOTE: Additional args such as stats file may also be added to
syncthingdiscosrv_args in /etc/rc.conf