Unbound control

hi
I almost finished the script to control unbound it’s making me the meat to run a script to reload unbound if you know how to do I’d like a little help if you can test the script to tell me if it works in your home Thank you
the file :
unboumdcontrol.zip (7,0 Ko)

Some comments:

  • script reload does a restart
  • What do you want to achieve?

hi
I would like to relaunch unbound for aplicate the rules
i have problem a right for execute the bash reload script
ty

for a service, usually you would pass the command directly to the system.

either in the background with system() or output echoed with Print .

for the command:

/etc/init.d/unbound restart

Also, there is nothing in /etc/unbound/local.d/ so the check config and restart is not going to work in the CGI file you posted.

hi
Thank you for your help I tried this meat

system("/etc/init.d/unbound restart");

but jobs this mistake

Can't exec "/etc/init.d/unbound": Permission denied at /srv/web/ipfire/cgi-bin/unboumdcontrol.cgi

ty

try:.

&General::system('/usr/local/bin/unboundctrl', 'reload');

but I think

require '/var/ipfire/general-functions.pl';

must be declared in the beginning for &General to work.

1 Like

hi
Thank you for your help its function well.