env variables

66 views
Skip to first unread message

Jeff VA2SS

unread,
May 4, 2024, 11:25:03 AMMay 4
to pat-users
Hi,

I might be missing something here, but when I try to change PAT env variables, it does not works here.... I'm trying to change the default values.

I am running 0.16 on my Mac, and when set... I added theses lines in my .zprofile

export PAT_MAILBOX_PATH="~/Documents/PAT/pat_config/mailbox"
export PAT_CONFIG_PATH="~/Documents/PAT/pat_config/config.json"
export PAT_LOG_PATH=~/Documents/PAT/pat_config/pat.log
export PAT_EVENTLOG_PATH=~/Documents/PAT/pat_config/eventlog.json
export PAT_FORMS_PATH=~/Documents/PAT/pat_config/Standard_Forms

When opening a new terminal window and do a export to check... there are persistent...

PAT_CONFIG_PATH=~/Documents/PAT/pat_config/config.json
PAT_EVENTLOG_PATH=/Users/va2ss/Documents/PAT/pat_config/eventlog.json
PAT_FORMS_PATH=/Users/va2ss/Documents/PAT/pat_config/Standard_Forms
PAT_LOG_PATH=/Users/va2ss/Documents/PAT/pat_config/pat.log
PAT_MAILBOX_PATH=/Users/va2ss/Documents/PAT/pat_config/mailbox

they are all there... 

but when doing pat env to check.... PAT still show the default values...

PAT_OS="darwin"
PAT_MAILBOX_PATH="/Users/va2ss/Library/Application Support/pat/mailbox"
PAT_CONFIG_PATH="/Users/va2ss/Library/Application Support/pat/config.json"
PAT_LOG_PATH="/Users/va2ss/Library/Application Support/pat/pat.log"
PAT_EVENTLOG_PATH="/Users/va2ss/Library/Application Support/pat/eventlog.json"
PAT_FORMS_PATH="/Users/va2ss/Library/Application Support/pat/Standard_Forms"
PAT_DEBUG=""


Help would be appreciated...

73 de Jeff | VA2SS 

Scott Busby

unread,
May 4, 2024, 2:57:42 PMMay 4
to pat-users
In your exports, you are inconsistently using quotes around the paths. Also, try using the full path, instead of starting with tilde "~". Since defaults use quotes, I would use quotes.
Scott KJ6VMH

Jeff VA2SS

unread,
May 4, 2024, 3:06:00 PMMay 4
to pat-users
could you give me an example that works ?

Martin Hebnes Pedersen

unread,
May 5, 2024, 5:33:26 AMMay 5
to Jeff VA2SS, pat-users
Hi Jeff,

These are env vars exposed by Pat for consumption by scripts. Most of them are not read by Pat.

Pat reads the XDR env vars, so you can use those to tweak config/state/cache dirs.



-- 
73 de LA5NTA / Martin.


--
You received this message because you are subscribed to the Google Groups "pat-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pat-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pat-users/1ecffad2-75d2-440c-9a37-487b817b8f7an%40googlegroups.com.

Jeff VA2SS

unread,
May 5, 2024, 6:56:40 AMMay 5
to pat-users
OK got it.  thanks everyone. 

73 de Jeff | VA2SS 



Dominic Reich

unread,
May 8, 2024, 12:27:09 AMMay 8
to pat-...@googlegroups.com
Starting pat with arguments pointing to the desired paths works.

#v+
pat --mbox {/real/path/that/exists/with/permissions} --forms .. --config .. --log .. --event-log .. env
#v-

Though, I only tested with the mailbox path as I could not make me copy
the others files aswell to other directories :P

-dominic
>--
>You received this message because you are subscribed to the Google Groups
>"pat-users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to [1]pat-users+...@googlegroups.com.
>To view this discussion on the web, visit [2]https://groups.google.com/d/msgid/
>pat-users/de9a3a8c-20d9-46c7-9876-a190c38169ban%40googlegroups.com.
>
>References:
>
>[1] mailto:pat-users+...@googlegroups.com
>[2] https://groups.google.com/d/msgid/pat-users/de9a3a8c-20d9-46c7-9876-a190c38169ban%40googlegroups.com?utm_medium=email&utm_source=footer


--
The beginning is the most important part of the work.
- Plato
Message has been deleted

HB9HIL

unread,
May 22, 2024, 7:11:31 PMMay 22
to pat-users
Because I'm a really lazy person and like to work with CLI I created a little bin for that:

Create a little file in a new folder called `bin`:

----------
mkdir -p ~/.bin
touch ~/.bin/patmail
----------

Edit the file with the editor of your choice (vi or nano)
----------
nano ~/.bin/patmail
----------

And place this code in there
----------

#!/bin/sh

PAT_MAILBOX_PATH="/Path/To/pat/mailbox"
PAT_CONFIG_PATH="/Path/To/pat/config.json"
PAT_LOG_PATH="/Path/To/pat/pat.log"
PAT_EVENTLOG_PATH="/Path/To/pat/eventlog.json"
PAT_FORMS_PATH="/Path/To/pat/Standard_Forms"

pat --mbox "$PAT_MAILBOX_PATH" --config "$PAT_CONFIG_PATH" --log "$PAT_LOG_PATH" --event-log "$PAT_EVENTLOG_PATH" --forms "$PAT_FORMS_PATH" "$@"

----------

Save the file with `Ctrl + X and Y` and
make the file executable

----------
chmod +x ~/.bin/patmail
----------

Source the bin path for it
----------
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.profile
source ~/.profile
----------

Now you can run
----------
patmail env
----------

And it shows you the paths you configured in `~/.bin/patmail`

Also `patmail connect telnet` works absolutely normal

Vy 73 de HB9HIL

------------------

Checkout https://www.wavelog.org/
Reply all
Reply to author
Forward
Message has been deleted
0 new messages