Project

General

Profile

Download (2.37 KB) Statistics
| Branch: | Tag: | Revision:
1 5b243f4e Bill Marquette
<?php
2
/* $Id$ */
3
/*
4 ce77a9c4 Phil Davis
	restart_httpd.php
5 5b243f4e Bill Marquette
6 ce77a9c4 Phil Davis
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
7
	Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
8
	All rights reserved.
9 5b243f4e Bill Marquette
10 ce77a9c4 Phil Davis
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12 5b243f4e Bill Marquette
13 ce77a9c4 Phil Davis
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15 5b243f4e Bill Marquette
16 ce77a9c4 Phil Davis
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30 5b243f4e Bill Marquette
*/
31 1d333258 Scott Ullrich
/*
32
	pfSense_BUILDER_BINARIES:	/bin/chmod
33
	pfSense_MODULE:	pkgs
34
*/
35 5b243f4e Bill Marquette
36 546c9e4a Ermal Lu?i
##|+PRIV
37
##|*IDENT=page-diagnostics-restart-httpd
38
##|*NAME=Diagnostics: Restart HTTPD : System page
39
##|*DESCR=Allow access to the 'Diagnostics: Restart HTTPD: System' page.
40
##|*MATCH=restart_httpd.php*
41
##|-PRIV
42
43 5b243f4e Bill Marquette
require_once("guiconfig.inc");
44 36bdbe2d Ermal Lu?i
45 c1ff2246 Rafael Lucas
$pgtitle = array(gettext("Restarting httpd"));
46 5b243f4e Bill Marquette
include("head.inc");
47
?>
48
49
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
50
<form>
51
<?php include("fbegin.inc"); ?>
52
53 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Mounting file systems read/write");?>...
54 fd0709e6 Bill Marquette
<?php flush(); sleep(1); conf_mount_rw(); ?>
55 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
56 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Forcing all PHP file permissions to 0755");?>...
57 1d333258 Scott Ullrich
<?php flush(); sleep(1); system('/bin/chmod -R 0755 /usr/local/www/*.php'); ?>
58 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
59 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Mounting file systems read only");?>...
60 fd0709e6 Bill Marquette
<?php flush(); sleep(1); conf_mount_ro(); ?>
61 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
62 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Restarting mini_httpd");?>...
63 5b243f4e Bill Marquette
<?php flush(); sleep(1); system_webgui_start(); ?>
64 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
65 5b243f4e Bill Marquette
66
<?php
67
include("fend.inc");
68
?>