OPNsense Forum

English Forums => Development and Code Review => Topic started by: ruslan-gennadievich on September 12, 2020, 01:36:09 am

Title: Develop in /usr/local/opnsense
Post by: ruslan-gennadievich on September 12, 2020, 01:36:09 am
I make some fix in gui, but my changes not apply (if i refresh page). How i can see my change? Maybe i can disable any cache to develop-debug process? How i can do it?
Title: Re: Develop in /usr/local/opnsense
Post by: ruslan-gennadievich on September 13, 2020, 01:06:31 am
Now i clear /tmp and then run
11) Reload all services

Maybe some body have more true way?)
Title: Re: Develop in /usr/local/opnsense
Post by: mimugmail on September 13, 2020, 06:53:57 am
What exactly did you change?
Title: Re: Develop in /usr/local/opnsense
Post by: ruslan-gennadievich on September 16, 2020, 07:07:22 pm
What exactly did you change?
I want to create new plugin, so i change some files in /usr/local/opnsense/mvc

I use this doc https://docs.opnsense.org/development/frontend/models_design.html
Title: Re: Develop in /usr/local/opnsense
Post by: franco on September 17, 2020, 08:40:40 am
Not specific enough.
Title: Re: Develop in /usr/local/opnsense
Post by: ruslan-gennadievich on September 24, 2020, 04:49:36 pm
For example, i edit src/opnsense/mvc/app/models/OPNsense/MyModule/Menu/Menu.xml

How i can see any changes? How i can disable all cache??
Title: Re: Develop in /usr/local/opnsense
Post by: franco on September 24, 2020, 05:07:42 pm
Aha, that is better...

/usr/local/etc/rc.configure_plugins will refresh the menu and ACL cache as well as restarting syslog.

It is the standard hook for the plugin framework executed on +POST_INSTALL:

https://github.com/opnsense/plugins/blob/master/Templates/configure

This is why we try to provide an automatic plugin framework because it will give you less headache. ;)


Cheers,
Franco
Title: Re: Develop in /usr/local/opnsense
Post by: ruslan-gennadievich on September 24, 2020, 06:04:48 pm
Thank you) Add this to Develop Documentation, please :)
Title: Re: Develop in /usr/local/opnsense
Post by: franco on September 24, 2020, 09:22:41 pm
Just use the plugin framework and you're good... There's no reason not to unless you are modifying core which also provides similar Makefile glue and post-install hooks...


Cheers,
Franco