summaryrefslogtreecommitdiffstats
path: root/proxy_wizard
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-03-02 14:12:24 +0000
committerFlorent Villard <warly@mandriva.com>2003-03-02 14:12:24 +0000
commit0c24f86ef88df61f17770a60376ab934101e6677 (patch)
treecd9dd64147084c7b7148f5a698bc7627c005382b /proxy_wizard
parent7eceb2bda4b5f28213df8611be6516f2c397835f (diff)
downloaddrakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.gz
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.bz2
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.xz
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.zip
use services.pm to restart smb in samba wizard
Diffstat (limited to 'proxy_wizard')
-rw-r--r--proxy_wizard/scripts/Squidconf.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/proxy_wizard/scripts/Squidconf.pm b/proxy_wizard/scripts/Squidconf.pm
index 528d3ab4..0155a72f 100644
--- a/proxy_wizard/scripts/Squidconf.pm
+++ b/proxy_wizard/scripts/Squidconf.pm
@@ -20,10 +20,12 @@
package Squidconf;
+use lib '/usr/lib/libDrakX';
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/Varspaceval.pm";
require "__WIZ_HOME__/common/scripts/IFCFG.pm";
use MDK::Common;
+use services;
use strict;
use standalone;
@@ -83,8 +85,7 @@ level = $ENV{wiz_squid_level}");
s|^\s*\#?\s*(http_access\s*)allow(\s*all.*)|\#$&\n$1deny$2|;
s|^\s*\#?\s*(http_access\s*allow\s*)mynetwork|\#$&\n$1localhost|;
} $file;
- }
- else { # should not happen
+ } else { # should not happen
die "wiz_squid_level error";
}
my $t = 0;
@@ -108,7 +109,11 @@ level = $ENV{wiz_squid_level}");
append_to_file($file, "cache_peer $ENV{wiz_squid_cachepeer} parent $ENV{wiz_squid_peerport} 3130");
}
system("/sbin/chkconfig --level 345 squid on");
- system("service squid start");
+ if (services::is_service_running('squid')) {
+ services::restart('squid')
+ } else {
+ services::start('squid')
+ }
10;
}
1;