Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: Nicarlo on January 17, 2008, 06:17:57 pm

Title: Proxy Question
Post by: Nicarlo 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
Title: Re: Proxy Question
Post by: Javier Amor Garcia 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;