Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2024 16:10:21 -0800
From:      Dan Mahoney <freebsd@gushi.org>
To:        "Robert R. Russell" <robert@rrbrussell.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: User specific daemons
Message-ID:  <E1D522D5-1ED9-46CA-9017-C03197B7A0B2@gushi.org>
In-Reply-To: <20240122175118.1ef3b25e@venus.private.rrbrussell.com>
References:  <20240122175118.1ef3b25e@venus.private.rrbrussell.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Jan 22, 2024, at 15:51, Robert R. Russell <robert@rrbrussell.com> =
wrote:
>=20
> How do I start and maintain a program as a user specific daemon? I
> don't mean run a daemon as a specific user. I need one of each daemon
> per user.
>=20
> Under Linux I could create a few $HOME/.config/systemd/daemon.service
> files run systemctl --user enable daemon.service and the problem was
> solved. The services specifically include tmux, and ssh-agent or
> gpg-agent. There were some other services I used this for but those =
were
> more Linux specific and thus less important.
>=20
> Before I go with the metaphorical hammer meets nail shaped object
> approach and port half of SystemD to FreeBSD using Rust what options
> should I try first.

I would do this with an @reboot cron job, which stepped over a list of =
users (you don't want *all* users, you want all the users in some =
group), and then fired those processes up.

If you really need those processes to restart, wrapper them with =
daemon(1).

-Dan=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1D522D5-1ED9-46CA-9017-C03197B7A0B2>