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