summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-07-17 01:37:11 +0000
committernia <nia@pkgsrc.org>2019-07-17 01:37:11 +0000
commita875b9121cd9b045968de698820698f47f81e566 (patch)
tree4ea68cefa41cbf8baa23643fc4df8274e3bf2347 /net
parentb6f7fae8c335cfdd1fdc36bba695d4336a96fe67 (diff)
downloadpkgsrc-a875b9121cd9b045968de698820698f47f81e566.tar.gz
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 (limited to 'net')
-rw-r--r--net/syncthing/files/syncthing.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/syncthing/files/syncthing.sh b/net/syncthing/files/syncthing.sh
index 175924c3117..4ba046c5925 100644
--- a/net/syncthing/files/syncthing.sh
+++ b/net/syncthing/files/syncthing.sh
@@ -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 @@ rcvar=${name}
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 @@ syncthing_precmd()
@CHMOD@ 0750 ${syncthing_logfile}
}
-load_rc_config $name
run_rc_command "$1"