Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
c7740782
Commit
c7740782
authored
Apr 02, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: remove restart_httpd.php and clean up the startup function
parent
8515fb0c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
82 deletions
+9
-82
priv.defs.inc
src/etc/inc/priv.defs.inc
+0
-6
system.inc
src/etc/inc/system.inc
+2
-16
rc.bootup
src/etc/rc.bootup
+1
-1
ACL_Legacy_Page_Map.txt
...ense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.txt
+0
-1
fbegin.inc
src/www/fbegin.inc
+6
-10
restart_httpd.php
src/www/restart_httpd.php
+0
-48
No files found.
src/etc/inc/priv.defs.inc
View file @
c7740782
...
...
@@ -728,12 +728,6 @@ $priv_list['page-diagnostics-rebootsystem']['descr'] = gettext("Allow access to
$priv_list
[
'page-diagnostics-rebootsystem'
][
'match'
]
=
array
();
$priv_list
[
'page-diagnostics-rebootsystem'
][
'match'
][]
=
"reboot.php*"
;
$priv_list
[
'page-diagnostics-restart-httpd'
]
=
array
();
$priv_list
[
'page-diagnostics-restart-httpd'
][
'name'
]
=
gettext
(
"WebCfg - Diagnostics: Restart HTTPD : System page"
);
$priv_list
[
'page-diagnostics-restart-httpd'
][
'descr'
]
=
gettext
(
"Allow access to the 'Diagnostics: Restart HTTPD: System' page."
);
$priv_list
[
'page-diagnostics-restart-httpd'
][
'match'
]
=
array
();
$priv_list
[
'page-diagnostics-restart-httpd'
][
'match'
][]
=
"restart_httpd.php*"
;
$priv_list
[
'page-services-captiveportal'
]
=
array
();
$priv_list
[
'page-services-captiveportal'
][
'name'
]
=
gettext
(
"WebCfg - Services: Captive portal page"
);
$priv_list
[
'page-services-captiveportal'
][
'descr'
]
=
gettext
(
"Allow access to the 'Services: Captive portal' page."
);
...
...
src/etc/inc/system.inc
View file @
c7740782
...
...
@@ -791,11 +791,6 @@ function system_webgui_start()
{
global
$config
,
$g
;
if
(
file_exists
(
"/var/run/booting"
))
{
/* XXX no no no no no no no no */
echo
gettext
(
"Starting webConfigurator..."
);
}
chdir
(
'/usr/local/www'
);
/* defaults */
...
...
@@ -864,17 +859,8 @@ function system_webgui_start()
/* regenerate the php.ini files in case the setup has changed */
mwexec
(
'/usr/local/etc/rc.php_ini_setup'
);
/* attempt to start lighthttpd */
$res
=
mwexec
(
"/usr/local/sbin/lighttpd -f
{
$g
[
'varetc_path'
]
}
/lighty-webConfigurator.conf"
);
if
(
file_exists
(
"/var/run/booting"
))
{
if
(
$res
==
0
)
echo
gettext
(
"done."
)
.
"
\n
"
;
else
echo
gettext
(
"failed!"
)
.
"
\n
"
;
}
return
$res
;
/* attempt to start lighthttpd and return true if ok */
return
!
mwexec
(
"/usr/local/sbin/lighttpd -f
{
$g
[
'varetc_path'
]
}
/lighty-webConfigurator.conf"
);
}
function
system_generate_lighty_config
(
...
...
src/etc/rc.bootup
View file @
c7740782
...
...
@@ -241,7 +241,7 @@ local_sync_accounts();
echo
"done.
\n
"
;
/* start web server */
system_webgui_start
()
;
echo
'Starting webConfigurator...'
.
(
system_webgui_start
()
?
'done.'
:
'failed.'
)
.
PHP_EOL
;
/* configure cron service */
echo
"Configuring CRON..."
;
...
...
src/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.txt
View file @
c7740782
...
...
@@ -114,7 +114,6 @@ page-services-ntp-pps=status_ntpd_pps.php*
page-loadbalancer-virtualserver-edit=load_balancer_virtual_server_edit.php*
page-package-edit=pkg_edit.php*
page-diagnostics-rebootsystem=reboot.php*
page-diagnostics-restart-httpd=restart_httpd.php*
page-services-captiveportal=services_captiveportal.php*
page-services-captiveportal-filemanager=services_captiveportal_filemanager.php*
page-services-captiveportal-allowedips=services_captiveportal_ip.php*
...
...
src/www/fbegin.inc
View file @
c7740782
...
...
@@ -248,15 +248,10 @@ $diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php");
$diagnostics_menu
[]
=
array
(
gettext
(
"States Summary"
),
"/diag_states_summary.php"
);
$diagnostics_menu
[]
=
array
(
gettext
(
"Tables"
),
"/diag_tables.php"
);
if
(
file_exists
(
"/var/run/gmirror_active"
))
if
(
file_exists
(
"/var/run/gmirror_active"
))
{
$diagnostics_menu
[]
=
array
(
gettext
(
"GEOM Mirrors"
),
"/diag_gmirror.php"
);
if
(
isset
(
$config
[
'system'
][
'developer'
]))
{
$diagnostics_menu
[]
=
array
(
gettext
(
"Restart HTTPD"
),
"/restart_httpd.php"
,
"style"
=>
"font-weight: bold; color: yellow;"
);
}
$diagnostics_menu
=
msort
(
$diagnostics_menu
,
0
);
$help_menu
=
array
();
...
...
@@ -269,12 +264,13 @@ $help_menu[] = array(gettext("Paid Support"), "https://opnsense.org/support-over
$help_menu
[]
=
array
(
gettext
(
"FreeBSD Handbook"
),
"https://www.freebsd.org/doc/handbook/"
);
$help_menu
=
msort
(
$help_menu
,
0
);
function
add_to_menu
(
$url
,
$name
)
{
if
(
isAllowedPage
(
$url
))
function
add_to_menu
(
$url
,
$name
)
{
if
(
isAllowedPage
(
$url
))
{
echo
"<a href=
\"
{
$url
}
\"
class=
\"
list-group-item
\"
>
{
$name
}
</a>
\n
"
;
}
}
/* display a top alert bar if need be */
$need_alert_display
=
false
;
$found_notices
=
are_notices_pending
();
...
...
src/www/restart_httpd.php
deleted
100644 → 0
View file @
8515fb0c
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"guiconfig.inc"
);
$pgtitle
=
array
(
gettext
(
"Restarting httpd"
));
include
(
"head.inc"
);
?>
<body
link=
"#0000CC"
vlink=
"#0000CC"
alink=
"#0000CC"
>
<form>
<?php
include
(
"fbegin.inc"
);
?>
<?=
gettext
(
"Forcing all PHP file permissions to 0755"
);
?>
...
<?php
flush
();
sleep
(
1
);
system
(
'/bin/chmod -R 0755 /usr/local/www/*.php'
);
?>
<?=
gettext
(
"Done"
);
?>
.
<br
/>
<?=
gettext
(
"Restarting mini_httpd"
);
?>
...
<?php
flush
();
sleep
(
1
);
system_webgui_start
();
?>
<?=
gettext
(
"Done"
);
?>
.
<br
/>
<?php
include
(
"fend.inc"
);
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment