Project

General

Profile

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