summaryrefslogtreecommitdiffstats
path: root/samba_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'samba_wizard')
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm8
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;