On Mon, Jan 16, 2023 at 4:04 PM matthew wall <[email protected]> wrote:

> um, why is "create a station" even looking for the location of weewxd?


So it knows what to fill in for the daemon configuration files. It needs a
value for things like ExecStart.

at 'station create' time, why not just copy all of the parameterized utils
> into the utils directory, without replacing any parameters?
>
(by 'parameters' i mean the WEEWX_ROOT, WEEWX_BINDIR, WEEWX_CFGDIR and
> others like them.  btw we need to canonicalize that list...)
>

weectl station create does exactly this, although in a backwards compatible
way.


> when someone actually installs something from utils, only *then* do you
> replace the parameters.  that is done either manually, or with weectl.  at
> that time you know *exactly* where everything is located, because if you
> are doing it with weectl, you know where weectl, is thus you know where
> weewxd is.  and if you are doing it manually, then you know what you are
> doing.
>

Can't do this because it requires 'sudo', which changes the path. In other
words, you can't do

*sudo weectl daemon install*


because it can't find weectl. Instead, you're asking the user to do

sudo /home/username/.local/bin/weectl daemon install

Even then, you have problems because weectl can't find weewxd. Remember, we
don't have access to weectl or weewxd: they're both provided by pip, not
me. The application weectl has no idea where weewxd is located except by
searching PATH, which is truncated when you do sudo. So, it can't find it.

To find weewxd, you must do it with an app that is not running sudo. That's
"weectl station create".


> the package installers are gonna want untouched,
> still-with-parameters-not-replaced-in-them files in the util directory.
> otherwise they will have to dig through the python tree to find them in
> their virgin form.
>

That's exactly what they get. The virgin weewx.conf is almost exactly the
same as in v4.9. That's how we provide backwards compatibility for setup.py
users. The only difference is that SQLITE_ROOT is now relative to
WEEWX_ROOT, instead of an absolute path.

or maybe i am misunderstanding this thread?
>

Believe me, I have explored every possibility. It's possible I've missed
something, but there's been a dead end in every approach I've tried.

Give it a try:

*pip install weewx --user*
*weectl station create*
*sudo cp ~/weewx-data/systemd/weewx.service /etc/systemd/system*


That's it to get a daemon going.

-tk

-- 
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/CAPq0zEBDwVMm7g8r4rYbBS7qqFTTjT58dY-_Scdv98HfPWESFA%40mail.gmail.com.

Reply via email to