1
/* GADMIN-SAMBA, an easy to use GTK+ frontend for the SAMBA file and print server.
2
* Copyright (C) 2006, 2007, 2008 Magnus Loef <magnus-swe@telia.com>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 3 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#include "../config.h"
29
#include "show_info.h"
33
extern int global_smbd_activated;
34
extern int global_nmbd_activated;
35
extern int global_winbindd_activated;
39
void deactivate_button_clicked(struct w *widgets)
43
/* We dont want it started by init at boot */
49
/* Killall -15 makes a graceful shutdown but leaves
50
the users logged on. This is not the desired
51
result for the admin here, hence -9 */
52
if( global_winbindd_activated )
54
stop = g_strdup_printf("killall -9 %s", WINBINDD_BINARY);
55
if( ! run_command(stop) )
57
info = g_strdup_printf("Stopping samba (winbindd) failed.\n");
64
stop = g_strdup_printf("killall -9 %s", SMBD_BINARY);
65
if( ! run_command(stop) )
67
info = g_strdup_printf("Stopping samba (smbd) failed.\n");
73
if( global_nmbd_activated )
75
stop = g_strdup_printf("killall -9 %s", NMBD_BINARY);
76
if( ! run_command(stop) )
78
info = g_strdup_printf("Stopping samba (nmbd) failed.\n");