summaryrefslogtreecommitdiff
path: root/source3/web/statuspage.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-07-27 01:37:33 +0000
committerSimo Sorce <idra@samba.org>2002-07-27 01:37:33 +0000
commit2ff0939301d738a3f8177ddb6e01781b638ce811 (patch)
tree3133df5b39dcbcc3208f72e7ed10852cf8fe64c6 /source3/web/statuspage.c
parent2a03547b6142ab934840332cda37013982cbe723 (diff)
downloadsamba-2ff0939301d738a3f8177ddb6e01781b638ce811.tar.gz
samba-2ff0939301d738a3f8177ddb6e01781b638ce811.tar.bz2
samba-2ff0939301d738a3f8177ddb6e01781b638ce811.zip
as per user request added windbind start/stop/restart in swat
almost working, seem it does not yet properly detect if windbind is running or not in all situations testing is welcome. (This used to be commit e0988e918667e3bc7b7cfb19ae81bf8c05fe582a)
Diffstat (limited to 'source3/web/statuspage.c')
-rw-r--r--source3/web/statuspage.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index 792e077a61..3b597d44c0 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -248,6 +248,20 @@ void status_page(void)
stop_nmbd();
}
+#ifdef WITH_WINBIND
+ if (cgi_variable("winbindd_restart")) {
+ stop_winbindd();
+ start_winbindd();
+ }
+
+ if (cgi_variable("winbindd_start")) {
+ start_winbindd();
+ }
+
+ if (cgi_variable("winbindd_stop")) {
+ stop_winbindd();
+ }
+#endif
if (cgi_variable("autorefresh")) {
autorefresh = 1;
} else if (cgi_variable("norefresh")) {
@@ -320,6 +334,20 @@ void status_page(void)
}
d_printf("</tr>\n");
+#ifdef WITH_WINBIND
+ fflush(stdout);
+ d_printf("<tr><td>%s</td><td>%s</td>\n", _("winbindd:"), winbindd_running()?_("running"):_("not running"));
+ if (geteuid() == 0) {
+ if (winbindd_running()) {
+ d_printf("<td><input type=submit name=\"winbindd_stop\" value=\"%s\"></td>\n", _("Stop winbindd"));
+ } else {
+ d_printf("<td><input type=submit name=\"winbindd_start\" value=\"%s\"></td>\n", _("Start winbindd"));
+ }
+ d_printf("<td><input type=submit name=\"winbindd_restart\" value=\"%s\"></td>\n", _("Restart winbindd"));
+ }
+ d_printf("</tr>\n");
+#endif
+
d_printf("</table>\n");
fflush(stdout);