OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: FingerlessGloves on March 23, 2019, 12:39:24 AM

Title: Adding custom script to OPNsense
Post by: FingerlessGloves on March 23, 2019, 12:39:24 AM
Hi Guys,

What's the best place to place a custom shell script in the OS?

I've create a script which gets me a port forwarded from PIA, but it has to run on OPNSense to do that.

I've currently got it placed in /conf/, but if there's a prefered location that would be great.

Also I've added a crontab record to /etc/crontab. Does that get reset by updates too?
Title: Re: Adding custom script to OPNsense
Post by: Northguy on March 23, 2019, 10:01:39 AM
Custom start-up script: https://docs.opnsense.org/development/backend/autorun.html
CRON job to be scheduled from front-end: https://docs.opnsense.org/development/backend/configd.html?highlight=scripts