[freshports-coders] fp-listen

Jesse Smith jessefrgsmith at yahoo.ca
Wed Aug 9 00:08:06 UTC 2023


I completed the task laid out below today. My steps were as follows:

1. Changed into the /usr/local/etc/freshports directory to confirm the
files I wanted were there and I could read them.

2. Made a backup copy of the current fp-listen.ini file, copying it my
home directory. Just in case I messed up the process.

3. Opened the fp-listen.ini file in one terminal in vi and
fp-listen.ini.sample file in a second terminal so I could compare them
side-by-side. The files are quite small, only a dozen lines or so, and I
figured it would be straight forward to compare them "by hand".

4. Identified the two new configuration files in the .sample file,
SANITY_CACHE_PATH and SANITY_MAIN_CACHE_PATH, and copied them to the
fp-listen.ini file.

5. Confirmed the paths these variables point to exist on the server (ie
I do not need to create the directory path manually).

6. Opened the freshports log file for monitoring in one terminal.
Restarted the fp_listen service in the other terminal. Confirmed the
expected  "Starting up" message was displayed.

7. Confirmed website is visible to users (ie nothing super bad went wrong).


I think that covers everything.

- Jesse






On 2023-08-07 6:50 p.m., Dan Langille wrote:
> The fp-listen daemon runs on the webserver node. It connects to the database and waits for signals. The signal wakes it up. Based on the signal, it takes an action, which might include reading a database table for a list of things to clear.
> 
> That list of things to clear has been enlarged.
> 
> fp-listen needs to know where to find the new things to clear from the cache. Cache is stored on disk. The fp-listen.ini.sample file has three new items. 
> 
> In short, fp-listen.ini needs to be updated based on what's in fp-listen.ini.sample
> 
> Look in /usr/local/etc/freshports/ for both files, update, and restart:
> 
> service fp_listen restart
> 
> and tail -F /var/log/freshports/freshports.log
> 
> It should start up like this:
> 
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: Starting up - this should not occur often
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: These are the (event name, script name) pairs we are ready for:
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('port_updated', 'listen_port')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('ports_moved', 'listen_ports_moved')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('ports_updating', 'listen_ports_updating')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('vuxml', 'listen_vuxml')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('category_new', 'listen_category_new')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('date_updated', 'listen_date_updated')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('packages_imported', 'listen_packages_imported')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('listen_for', 'ClearPackagesCache')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: ('commit_updated', 'listen_commit')
> Aug  6 14:21:42 dev-nginx01 fp-listen[38244]: Just woke up! *************
> 
> Please post your work.  I know posting your work wasn't mentioned before you joined up. I think it would be useful for others to see.
> 
> Thank you.
> 



More information about the freshports-coders mailing list