Project

General

Profile

Download (1.68 KB) Statistics
| Branch: | Tag: | Revision:
1 5b243f4e Bill Marquette
<?php
2
/*
3 c5d81585 Renato Botelho
 * restart_httpd.php
4 b9043cdc Stephen Beaver
 *
5 c5d81585 Renato Botelho
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2016 Electric Sheep Fencing, LLC
7
 * Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>
8
 * All rights reserved.
9 b9043cdc Stephen Beaver
 *
10 b12ea3fb Renato Botelho
 * 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 b9043cdc Stephen Beaver
 *
14 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
15 b9043cdc Stephen Beaver
 *
16 b12ea3fb Renato Botelho
 * 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 b9043cdc Stephen Beaver
 */
22 5b243f4e Bill Marquette
23 546c9e4a Ermal Lu?i
##|+PRIV
24
##|*IDENT=page-diagnostics-restart-httpd
25 9599211d jim-p
##|*NAME=Diagnostics: Restart Web Server Daemon
26
##|*DESCR=Allow access to the 'Diagnostics: Restart Web Server Daemon' page.
27 546c9e4a Ermal Lu?i
##|*MATCH=restart_httpd.php*
28
##|-PRIV
29
30 5b243f4e Bill Marquette
require_once("guiconfig.inc");
31 36bdbe2d Ermal Lu?i
32 c1ff2246 Rafael Lucas
$pgtitle = array(gettext("Restarting httpd"));
33 5b243f4e Bill Marquette
include("head.inc");
34
?>
35
36
<form>
37 86573bb9 Phil Davis
<?php include_once("fbegin.inc"); ?>
38 5b243f4e Bill Marquette
39 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Mounting file systems read/write");?>...
40 fd0709e6 Bill Marquette
<?php flush(); sleep(1); conf_mount_rw(); ?>
41 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
42 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Forcing all PHP file permissions to 0755");?>...
43 1d333258 Scott Ullrich
<?php flush(); sleep(1); system('/bin/chmod -R 0755 /usr/local/www/*.php'); ?>
44 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
45 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Mounting file systems read only");?>...
46 fd0709e6 Bill Marquette
<?php flush(); sleep(1); conf_mount_ro(); ?>
47 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
48 a0d37fd5 Carlos Eduardo Ramos
<?=gettext("Restarting mini_httpd");?>...
49 5b243f4e Bill Marquette
<?php flush(); sleep(1); system_webgui_start(); ?>
50 8cd558b6 ayvis
<?=gettext("Done");?>.<br />
51 5b243f4e Bill Marquette
52
<?php
53 01036a9a Stephen Beaver
include("foot.inc");
54 5b243f4e Bill Marquette
?>