Skip to content

fix: Set static pidfile directory#206

Open
kumy wants to merge 1 commit intoopnsense:masterfrom
kumy:issue-4259
Open

fix: Set static pidfile directory#206
kumy wants to merge 1 commit intoopnsense:masterfrom
kumy:issue-4259

Conversation

@kumy
Copy link

@kumy kumy commented Nov 11, 2024

Relates to opnsense/plugins#4260

  • patch the ports Makefile to add custom include
  • patch the rc script to set a custom static pidfile directory

@fichtner
Copy link
Member

Let me think about this. I'm not sure FreeBSD ports will accept this as is.

@kumy
Copy link
Author

kumy commented Mar 27, 2025

Hi @fichtner any news? 🙏

@fichtner
Copy link
Member

fichtner commented Mar 27, 2025

Sorry for dropping this. It's all just not very nice

% git grep client/logs
Makefile:       ${MKDIR} ${STAGEDIR}${WWWDIR}/client/logs
files/xymon-client.in:pidfile="%%WWWDIR%%/client/logs/clientlaunch.`hostname`.pid"
files/xymon-client.in:command_args="--config=%%WWWDIR%%/client/etc/clientlaunch.cfg --log=%%WWWDIR%%/client/logs/clientlaunch.log --pidfile=${pidfile}"
files/xymon-client.in:  chown -R ${xymon_client_user} %%WWWDIR%%/client/logs
pkg-plist:@dir %%WWWDIR%%/client/logs

So apart from the PID file it also wants to push logs into WWWDIR. Would it work if we set WWWDIR=${ETCDIR} and change XYMONTOPDIR to ${PREFIX}/etc/xymon/client ?

Cheers,
Franco


xymonclient.cfg: xymonclient.cfg.DIST
cat xymonclient.cfg.DIST | sed -e 's!@XYMONHOSTIP@!$(XYMONHOSTIP)!g' >xymonclient.cfg
+ echo 'include /usr/local/etc/xymon/xymonclient.cfg' >>xymonclient.cfg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not sure if this is really a useful thing to do. The plugin controls the whole config file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants