MeshCentral: BUG - FreeBSD Agent will not start on startup with OPNSense when using the binary

This is strange. The agent functions properly but refuses to start at startup with OPNSense which is based around HardenedBSD. If I login to the Firewall (OPNSense) and manually start the agent after a reboot it connects without any problems. But it refuses to start at startup even when using the system method of “service meshagent enable”.

I should note that I’m using a customized agent but after install of the agent it is present in the /etc/rc.conf.local file. So it should be starting on boot. Any ideas anyone?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23

Most upvoted comments

@krayon007 @Ylianst Where is this at? Has it already been released?

This should’ve went live with v0.7.59

Sorry, my mistake… The .sh fix, only seemed to correct auto_start on pfsense, not opnsense… I’ll look into why auto_start isn’t working opnsense…

@krayon007 LOL…I just applied that fix and restarted the firewall. Will post what I come up with.

ok, I found the real solution for OPNsense… go to the following folder: /usr/local/etc/rc.syshook.d/start

You need to add a script to this folder… The easiest way is to just copy 90-cron into 50-LaptopPitstopAgent Then edit the file and change: configctl cron restart to service LaptopPitstopAgent start and save, chmod 770, and reboot.

I’ll fix the installer to do this for opnsense.

@krayon007 I can confirm with you that previous solution did not work. I will report in just a few about the latest solution you provided.