Agreed.
— Antoine > On 6 Aug 2022, at 19:07, Stuart Henderson <s...@spacehopper.org> wrote: > > On 2022/08/06 18:00, Omar Polo wrote: >> Andre Stoebe <as@nul.space> wrote: >>> >>> Stuart Henderson wrote: >>>>> 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 >>> >>> Thanks a lot Omar, it works fine for me, including the change that >>> Stuart suggested. >>> >>> I think you can also use VARBASE inside rc_pre() for consistency. >> >> arggg, you're both right, sorry, i was too sloppy! > > Technically should be ${LOCALSTATEDIR} if we're doing variables. > That said I think just using plain /var is fine too.. > > > >> 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 15:57:28 -0000 >> @@ -2,9 +2,14 @@ >> >> daemon="${TRUEPREFIX}/bin/turnserver --daemon" >> daemon_user="_turnserver" >> +daemon_flags="--pidfile ${VARBASE}/run/turnserver/turnserver.pid" >> >> . /etc/rc.d/rc.subr >> >> rc_reload=NO >> + >> +rc_pre() { >> + install -d -o ${daemon_user} ${VARBASE}/run/turnserver >> +} >> >> rc_cmd $1 >> >> >