diff options
author | Florent Villard <warly@mandriva.com> | 2003-03-02 14:12:24 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2003-03-02 14:12:24 +0000 |
commit | 0c24f86ef88df61f17770a60376ab934101e6677 (patch) | |
tree | cd9dd64147084c7b7148f5a698bc7627c005382b /samba_wizard/scripts | |
parent | 7eceb2bda4b5f28213df8611be6516f2c397835f (diff) | |
download | drakwizard-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 'samba_wizard/scripts')
-rwxr-xr-x | samba_wizard/scripts/Smbconf.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm index b44c61e9..253b9c0c 100755 --- a/samba_wizard/scripts/Smbconf.pm +++ b/samba_wizard/scripts/Smbconf.pm @@ -19,10 +19,12 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. package Smbconf; +use lib '/usr/lib/libDrakX'; require "__WIZ_HOME__/common/scripts/Vareqval.pm"; require "__WIZ_HOME__/common/scripts/IFCFG.pm"; use MDK::Common; use strict; +use services; use Data::Dumper; # All possibilies in the config file must be precedeed by ";" @@ -327,7 +329,11 @@ sub do_it { $conf->comment_menu("printers", ";"); } $conf->write_conf("/etc/samba/smb.conf"); - system("/etc/rc.d/init.d/smb restart"); + if (services::is_service_running('smb')) { + services::restart('smb') + } else { + services::start('smb') + } 10; } 1; |