Author Topic: Proxy Question  (Read 2161 times)

Nicarlo

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Proxy Question
« on: January 17, 2008, 06:17:57 pm »
Wow my third question about the proxy services.

First id like to say your product is awesome.

I have a suggestion/question

How could I make it so during a certain time of the day the proxy would be turned off so users can access any website they would like?

I was thinking doing a cron job would probably be the best but not sure what command to run.

Could someone please help me out ?

Thank you very much

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Proxy Question
« Reply #1 on: January 21, 2008, 09:24:40 am »
We don't have this feature implemented.
As you say, you can implement a script that changes the active status of the proxy module.

You can use this as start point (warning: not tested!):
Code: [Select]
#!/usr/bin/perl
use strict;
use warnings;


use EBox;
use EBox::Global;


my ($service) = @ARGV;
if (not defined $service) {
   die 'you must supply a value for the new proxy service status';
}

EBox::init();

my $proxy = EBox::Global->modInstance('squid');

$proxy->setService($service);

$global->saveAllModules();

1;
« Last Edit: January 21, 2008, 09:31:01 am by Javier Amor Garcia »