Index: head/net/syncthing-discosrv/Makefile =================================================================== --- head/net/syncthing-discosrv/Makefile (revision 393694) +++ head/net/syncthing-discosrv/Makefile (revision 393695) @@ -1,43 +1,43 @@ # Created by: Steve Wills # $FreeBSD$ PORTNAME= syncthing-discosrv PORTVERSION= 0.0.0.2015062601 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MAINTAINER= swills@FreeBSD.org COMMENT= Discovery server for syncthing BUILD_DEPENDS= ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go USE_GITHUB= yes GH_ACCOUNT= syncthing golang:gc GH_PROJECT= discosrv syncthing:st groupcache:gc GH_TAGNAME= 4c705ff v${SYNCTHING_VER}:st 604ed57:gc SYNCTHING_VER= 0.11.18 PLIST_FILES= bin/syncthing-discosrv USE_RC_SUBR= syncthing-discosrv USERS= syncthing GROUPS= syncthing STRIP= # stripping can break go binaries post-patch: @${MV} ${WRKSRC_st}/Godeps/_workspace/src/ ${WRKSRC} @${MKDIR} ${WRKSRC}/src/github.com/golang @${MV} ${WRKSRC_st} ${WRKSRC}/src/github.com/syncthing/syncthing @${MV} ${WRKSRC_gc} \ ${WRKSRC}/src/github.com/golang/groupcache do-build: @cd ${WRKSRC} ; ${SETENV} GOPATH=${WRKSRC} go build @${MV} ${WRKSRC}/discosrv-${GH_TAGNAME} ${WRKSRC}/syncthing-discosrv do-install: ${INSTALL_PROGRAM} ${WRKSRC}/syncthing-discosrv ${STAGEDIR}${PREFIX}/bin/ .include Index: head/net/syncthing-discosrv/files/syncthing-discosrv.in =================================================================== --- head/net/syncthing-discosrv/files/syncthing-discosrv.in (revision 393694) +++ head/net/syncthing-discosrv/files/syncthing-discosrv.in (revision 393695) @@ -1,55 +1,54 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: syncthingdiscosrv # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # syncthingdiscosrv_enable (bool): Set to NO by default. # Set it to YES to enable syncthing-discosrv. # syncthingdiscosrv_user (user): Set user to run syncthing-discosrv. # Default is "syncthing". # syncthingdiscosrv_group (group): Set group to run syncthing-discosrv. # Default is "syncthing". # syncthingdiscosrv_dir (dir): Set dir to run syncthing-discosrv in. -# Default is "/var/tmp/syncthing". +# Default is "/var/db/syncthing-discosrv". . /etc/rc.subr name=syncthingdiscosrv rcvar=syncthingdiscosrv_enable load_rc_config $name : ${syncthingdiscosrv_enable:="NO"} : ${syncthingdiscosrv_user:="syncthing"} : ${syncthingdiscosrv_group:="syncthing"} -: ${syncthingdiscosrv_dir:="/var/tmp/syncthing"} +: ${syncthingdiscosrv_dir:="/var/db/syncthing-discosrv"} export STNORESTART=true -export HOME=${syncthingdiscosrv_dir} pidfile=/var/run/syncthingdiscosrv.pid procname="%%PREFIX%%/bin/syncthing-discosrv" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} ${procname} ${syncthingdiscosrv_flags}" +command_args="-f -p ${pidfile} ${procname} -db-dir=${syncthingdiscosrv_dir}/db -stats-file=${syncthingdiscosrv_dir}/stats ${syncthingdiscosrv_flags}" start_precmd=syncthingdiscosrv_startprecmd syncthingdiscosrv_startprecmd() { if [ ! -e ${pidfile} ]; then install -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} /dev/null ${pidfile}; fi if [ ! -d ${syncthingdiscosrv_dir} ]; then install -d -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} ${syncthingdiscosrv_dir} fi } run_rc_command "$1"