pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/syncthing/files syncthing: various rc.subr script ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6bd20073a3a5
branches:  trunk
changeset: 336532:6bd20073a3a5
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Jul 17 01:37:11 2019 +0000

description:
syncthing: various rc.subr script changes

- redirect stdout to /dev/null to avoid duplicating output that is already
  logged to a file
- use load_rc_config after setting defaults in order to allow overriding
  them in the local rc.conf

from David Brownlee

diffstat:

 net/syncthing/files/syncthing.sh |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 2663024de409 -r 6bd20073a3a5 net/syncthing/files/syncthing.sh
--- a/net/syncthing/files/syncthing.sh  Wed Jul 17 01:32:37 2019 +0000
+++ b/net/syncthing/files/syncthing.sh  Wed Jul 17 01:37:11 2019 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: syncthing.sh,v 1.1 2019/05/24 19:25:55 nia Exp $
+# $NetBSD: syncthing.sh,v 1.2 2019/07/17 01:37:11 nia Exp $
 #
 # PROVIDE: syncthing
 # REQUIRE: DAEMON
@@ -10,6 +10,8 @@
 name="syncthing"
 rcvar=${name}
 
+load_rc_config $name
+
 : ${syncthing_user:=@SYNCTHING_USER@}
 : ${syncthing_user_home:=@VARBASE@/db/syncthing}
 : ${syncthing_group:=@SYNCTHING_GROUP@}
@@ -18,7 +20,7 @@
 
 command="@PREFIX@/bin/syncthing"
 command_args="-logfile ${syncthing_logfile}"
-command_args="${command_args} -home ${syncthing_home} &"
+command_args="${command_args} -home ${syncthing_home} > /dev/null &"
 
 syncthing_env="STNODEFAULTFOLDER=1"
 syncthing_env="${syncthing_env} USER=${syncthing_user}"
@@ -33,5 +35,4 @@
        @CHMOD@ 0750 ${syncthing_logfile}
 }
 
-load_rc_config $name
 run_rc_command "$1"



Home | Main Index | Thread Index | Old Index