On 2022/08/06 11:56, Omar Polo wrote:
> Andre Stoebe <as@nul.space> wrote:
> > You really don't see the same behaviour, Omar? I don't have anything
> > set, neither in /etc/rc.conf.local nor in /etc/rc.d/turnserver.
> 
> Yes, I can see it too now.  I have a long uptime on that server and
> /tmp/ was very likely been cleared at least once.  After restarting
> turnserver I have a /tmp/turnserver.pid.  sorry for the noise.
> 
> So, I agree with your proposal, here's an updated diff that I'm
> testing and seems to work for me:

--daemon should be in daemon not daemon_flags because it shouldn't be
overridden


> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/telephony/coturn/Makefile,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile
> --- Makefile  31 Mar 2022 13:44:42 -0000      1.12
> +++ Makefile  6 Aug 2022 09:52:52 -0000
> @@ -2,7 +2,7 @@ COMMENT =     coturn STUN/TURN server
>  
>  V =          4.5.2
>  DISTNAME =   turnserver-${V}
> -REVISION =   2
> +REVISION =   3
>  
>  CATEGORIES = telephony
>  
> @@ -32,6 +32,8 @@ CONFIGURE_ARGS =    --localstatedir='${LOCA
>  CONFIGURE_ENV =              TURN_NO_MONGO=1 \
>                       TURN_NO_PROMETHEUS=1 \
>                       TURN_NO_SYSTEMD=1
> +
> +SUBST_VARS +=                VARBASE
>  
>  post-install:
>       rm -rf ${PREFIX}/etc
> Index: pkg/turnserver.rc
> ===================================================================
> RCS file: /home/cvs/ports/telephony/coturn/pkg/turnserver.rc,v
> retrieving revision 1.3
> diff -u -p -r1.3 turnserver.rc
> --- pkg/turnserver.rc 11 Mar 2022 19:58:30 -0000      1.3
> +++ pkg/turnserver.rc 6 Aug 2022 09:48:53 -0000
> @@ -1,10 +1,15 @@
>  #!/bin/ksh
>  
> -daemon="${TRUEPREFIX}/bin/turnserver --daemon"
> +daemon="${TRUEPREFIX}/bin/turnserver"
>  daemon_user="_turnserver"
> +daemon_flags="--daemon --pidfile ${VARBASE}/run/turnserver/turnserver.pid"
>  
>  . /etc/rc.d/rc.subr
>  
>  rc_reload=NO
> +
> +rc_pre() {
> +     install -d -o ${daemon_user} /var/run/turnserver
> +}
>  
>  rc_cmd $1
> 

Reply via email to