From nobody Wed Dec 21 15:31:52 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nccr734p2z1G021 for ; Wed, 21 Dec 2022 15:32:07 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nccr710yXz3H5W for ; Wed, 21 Dec 2022 15:32:07 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-144b21f5e5fso19494625fac.12 for ; Wed, 21 Dec 2022 07:32:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4DlyNj6pIGFBAA8R6O001ns7st11jBa7yfRSRovI9O8=; b=YR9lfnvJxn4oJL0BoQBMJpjE/forh8HjPJr8FsDIcX5wQ0GAWQbBlUz1ddS8A79JxD ycwC1MDHmrRcxhCMs5ZyHJCUFxTndzp691Nekt2aKI4vZX8qKaYKZPCPoa1EcGuTh9b+ UBVR8LqVDsPtNglt9uF88NgDBNceh9f2vzEiivllTFw2ZvliFLmKvnsP+6JVVI4f6Va8 +j93GcIO2ryKeHyVKd4WevffA3kcUe2549sayZaRR2BUSOLPspJFt71d6o9gNt7BfRRl IEQcPC3G9vPyGmjla0FH4FVaglepbxm2mBSdQoMCoNf9hk2AgqVRah9O/L30tDrY7IQN sAjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4DlyNj6pIGFBAA8R6O001ns7st11jBa7yfRSRovI9O8=; b=Awcdo1bxgIueXm1BBXRDiPQ0o81wQpyD0FuuxpOz2Azu0EeJ9yIwch1dsZvmhvwNAL OdjyVYe3Zo7Rxjd4gR4i3s6d3d1py6chdB6xtpt7FERbFDfbrWgiYi24p6CCw4RP0AeU 9Q+HGjrfqjgHVX07o7N0Fu9fOK3eiuuK3/Qza9fImv5JaT8QUFb0VTwza18Beh1l/KyG cxdN/JidkA1+fKO+fge4bXxQ+GEQCWMqrs0NwC5kBnsR45kshPH1pSEgdzcvTrEMSRus RcUGBHsntkMnGjataBRJinGrJqgRQDlR1AAzV7Tjb3suIPXhrDsLRkKWTscq39zVGPRl EbSg== X-Gm-Message-State: AFqh2kqwgfLS/asrME3Ijfnlp0HD2ipOgtz9cDIDrgOd8Rk81EgSgOyd FesnvDCYURA+BgUfvY+n4DrxQ9lRN0zsqo+rIGQZEXHKGg== X-Google-Smtp-Source: AMrXdXvR8qb6a41dxoF5pkQ4qhV2PAGj9VZwYEH0vgVzJ0r7m6om9PzPBRMKqG2sBv0mmo/Ou+WYmxxGOJOZqWHrymQ= X-Received: by 2002:a05:6871:4194:b0:144:6067:de3e with SMTP id lc20-20020a056871419400b001446067de3emr107262oab.148.1671636725362; Wed, 21 Dec 2022 07:32:05 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Paul Procacci Date: Wed, 21 Dec 2022 10:31:52 -0500 Message-ID: Subject: Re: rc script for a program - detach from tty? To: Odhiambo Washington Cc: questions Content-Type: multipart/alternative; boundary="0000000000003576ff05f05841c3" X-Rspamd-Queue-Id: 4Nccr710yXz3H5W X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000003576ff05f05841c3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Here's a snippet of something I wrote for motioneye ( https://github.com/motioneye-project/motioneye) . /etc/rc.subr name=3D"motioneye" rcvar=3D"motioneye_enable" load_rc_config $name : ${motioneye_enable:=3D"no"} : ${motioneye_pid:=3D"/var/run/motioneye/motioneye.pid"} : ${motioneye_conf:=3D"/usr/local/etc/motioneye/motioneye.conf"} : ${motioneye_db:=3D"/var/db/motioneye"} : ${motioneye_suser:=3D"motioneye"} pidfile=3D"${motioneye_pid}" procname=3D"/usr/local/bin/meyectl" command_interpreter=3D"/usr/local/bin/python3" command=3D"/usr/sbin/daemon" command_args=3D"-u $motioneye_suser -f -p ${motioneye_pid} $procname startserver -c ${motioneye_conf}" run_rc_command "$1" I don't know how the program you are trying to invoke behaves. It's hard to provide you with a specific answer due to this. What have you tried thus far? What results are you getting when invoking it? ~Paul On Wed, Dec 21, 2022 at 10:16 AM Odhiambo Washington wrote: > > > On Wed, Dec 21, 2022 at 6:06 PM Paul Procacci wrote= : > >> I'm sorry, I just woke up. >> >> daemon(8) will probably work for you. Not daemon(7). >> > > I had already read that. And the man page is the same. > It's just that I wasn't able to figure out howto. > > -- > Best regards, > Odhiambo WASHINGTON, > Nairobi,KE > +254 7 3200 0004/+254 7 2274 3223 > "Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-) > --=20 __________________ :(){ :|:& };: --0000000000003576ff05f05841c3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here's a snippet of something I wrote for motione= ye (https://gith= ub.com/motioneye-project/motioneye)

. /etc/rc.subr
name=3D"motioneye"
rcvar=3D"motioneye_enable"
lo= ad_rc_config $name

: ${motioneye_enable:=3D"no"}
: ${mo= tioneye_pid:=3D"/var/run/motioneye/motioneye.pid"}
: ${motione= ye_conf:=3D"/usr/local/etc/motioneye/motioneye.conf"}
: ${moti= oneye_db:=3D"/var/db/motioneye"}
: ${motioneye_suser:=3D"= motioneye"}

pidfile=3D"${motioneye_pid}&= quot;
procname=3D"/usr/local/bin/meyectl"
command_interpr= eter=3D"/usr/local/bin/python3"
command=3D"/usr/sbin/daem= on"
command_args=3D"-u $motioneye_suser -f -p ${motioneye_pid}= $procname startserver -c ${motioneye_conf}"

run_rc_comman= d "$1"


I don't know h= ow the program you are trying to invoke behaves.
It's har= d to provide you with a specific answer due to this.
What hav= e you tried thus far?=C2=A0 What results are you getting when invoking it?<= br>
~Paul

On Wed, Dec 21, 2022 at 10:16 AM Odhiambo = Washington <odhiambo@gmail.com= > wrote:


On Wed, Dec 21, 2022 at 6:06 PM Paul Proc= acci <pprocacci= @gmail.com> wrote:
I'm sorry, I just woke up.
<= br>
daemon(8) will probably work for you.=C2=A0 Not daemon(7).

I had already read th= at. And the man page is the same.
It's just that I wasn't able = to figure out howto.

--
Best regards,
Odhiambo WASHINGT= ON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.",=C2=A0egrep -v '^$|^.*#= '=C2=A0=C2=AF\_(=E3=83=84)_/=C2=AF=C2=A0:-)
=

--
__________________

:(){ :|:& };:
--0000000000003576ff05f05841c3--