Project

General

Profile

Download (1.69 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * restart_httpd.php
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
7
 * Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>
8
 * All rights reserved.
9
 *
10
 * Licensed under the Apache License, Version 2.0 (the "License");
11
 * you may not use this file except in compliance with the License.
12
 * You may obtain a copy of the License at
13
 *
14
 * http://www.apache.org/licenses/LICENSE-2.0
15
 *
16
 * Unless required by applicable law or agreed to in writing, software
17
 * distributed under the License is distributed on an "AS IS" BASIS,
18
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
 * See the License for the specific language governing permissions and
20
 * limitations under the License.
21
 */
22

    
23
##|+PRIV
24
##|*IDENT=page-diagnostics-restart-httpd
25
##|*NAME=Diagnostics: Restart Web Server Daemon
26
##|*DESCR=Allow access to the 'Diagnostics: Restart Web Server Daemon' page.
27
##|*MATCH=restart_httpd.php*
28
##|-PRIV
29

    
30
require_once("guiconfig.inc");
31

    
32
$pgtitle = array(gettext("Restarting httpd"));
33
include("head.inc");
34
?>
35

    
36
<form>
37
<?php include_once("fbegin.inc"); ?>
38

    
39
<?=gettext("Mounting file systems read/write");?>...
40
<?php flush(); sleep(1); conf_mount_rw(); ?>
41
<?=gettext("Done");?>.<br />
42
<?=gettext("Forcing all PHP file permissions to 0755");?>...
43
<?php flush(); sleep(1); system('/bin/chmod -R 0755 /usr/local/www/*.php'); ?>
44
<?=gettext("Done");?>.<br />
45
<?=gettext("Mounting file systems read only");?>...
46
<?php flush(); sleep(1); conf_mount_ro(); ?>
47
<?=gettext("Done");?>.<br />
48
<?=gettext("Restarting mini_httpd");?>...
49
<?php flush(); sleep(1); system_webgui_start(); ?>
50
<?=gettext("Done");?>.<br />
51

    
52
<?php
53
include("foot.inc");
54
?>
(103-103/226)