Maybe I'm wrong, but I doubt very many people will be using SELinux and, if
they do, they should be prepared for these kinds of problems. I don't want
to clutter up the quick guides for these rare cases.

On Sat, Jan 28, 2023 at 11:22 AM Vince Skahan <[email protected]> wrote:

> I did a little rocky/9 testing in a vagrant VM and came up with a script
> that works for a one-step install 'after' you log in as a non-privileged
> user who can sudo.  The result is that weewx is started via systemd and
> runs as the non-privileged user.
>
> # required for building pyephem
> sudo yum install -y python3-devel gcc python3-pip
> pip3 install --user wheel
>
> # install weewx in Simulator mode as an unprivileged user
> pip3 install --user weewx
> weectl station create --no-prompt
>
> # selinux will prevent systemd from starting weewxd if enforcing
> #  this forces the context to match /bin/ls which seems to work
> #  although I'm not sure which context really should be applied here
> #  nor whether future updates 'unprivileged' require this too
> chcon -R --reference /bin/ls ~/.local/bin
>
> # put the systemd service into place and start weewx up
> cd ~/weewx-data
> sudo cp util/systemd/weewx.service /etc/systemd/system
> sudo systemctl daemon-reload
> sudo systemctl enable weewx
> sudo systemctl start weewx
>
>
> [...Tom - let me know if you want a PR to update the v5 RH quickstart to
> use systemd and to fix up selinux (ugh) getting in the way...]
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/d478e71c-ac60-4fdf-abd6-d55377b186f4n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/d478e71c-ac60-4fdf-abd6-d55377b186f4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zECAF9oiL567TFKr%2BBDdbk_gH_QVQ%3DHr%3D%2B%3Dwdx6vDviDww%40mail.gmail.com.

Reply via email to