mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
webgui: clean up after rework
This commit is contained in:
parent
f532215538
commit
3386053709
@ -44,13 +44,4 @@ if /usr/local/etc/rc.d/configd status > /dev/null; then
|
||||
/usr/local/etc/rc.d/configd restart
|
||||
fi
|
||||
|
||||
echo "Flush Phalcon volt templates"
|
||||
rm -f /usr/local/opnsense/mvc/app/cache/*.php
|
||||
|
||||
echo "Reloading GUI configuration"
|
||||
/usr/local/etc/rc.php_ini_setup
|
||||
if pgrep -q php-cgi; then
|
||||
pkill -HUP php-cgi
|
||||
fi
|
||||
|
||||
/usr/local/etc/rc.configure_firmware
|
||||
|
||||
7
Makefile
7
Makefile
@ -306,13 +306,6 @@ style: want-pear-PHP_CodeSniffer
|
||||
style-fix: want-pear-PHP_CodeSniffer
|
||||
phpcbf --standard=ruleset.xml ${.CURDIR}/src/opnsense || true
|
||||
|
||||
setup: force
|
||||
${.CURDIR}/src/etc/rc.php_ini_setup
|
||||
|
||||
health: force
|
||||
# check test script output and advertise a failure...
|
||||
[ "`${.CURDIR}/src/etc/rc.php_test_run`" == "FCGI-PASSED PASSED" ]
|
||||
|
||||
test: want-phpunit
|
||||
@cd ${.CURDIR}/src/opnsense/mvc/tests && \
|
||||
phpunit --configuration PHPunit.xml
|
||||
|
||||
@ -83,7 +83,7 @@ install-${TARGET}: force
|
||||
|
||||
plist-${TARGET}: force
|
||||
.for TREE in ${TREES_${TARGET}}
|
||||
@(cd ${TREE}; find * -type f ${_IGNORES}) | while read FILE; do \
|
||||
@(cd ${TREE}; find * -type f ${_IGNORES} -o -type l) | while read FILE; do \
|
||||
FILE="$${FILE%%.in}"; PREFIX=""; \
|
||||
if [ -z "${NO_SAMPLE}" -a "$${FILE%%.sample}" != "$${FILE}" ]; then \
|
||||
PREFIX="@sample "; \
|
||||
|
||||
6
plist
6
plist
@ -122,8 +122,6 @@
|
||||
/usr/local/etc/rc.newwanip
|
||||
/usr/local/etc/rc.newwanipv6
|
||||
/usr/local/etc/rc.openvpn
|
||||
/usr/local/etc/rc.php_ini_setup
|
||||
/usr/local/etc/rc.php_test_run
|
||||
/usr/local/etc/rc.reboot
|
||||
/usr/local/etc/rc.recover
|
||||
/usr/local/etc/rc.reload_all
|
||||
@ -722,6 +720,10 @@
|
||||
/usr/local/opnsense/service/templates/OPNsense/Sample/sub2/example_sub2.txt
|
||||
/usr/local/opnsense/service/templates/OPNsense/Syslog/+TARGETS
|
||||
/usr/local/opnsense/service/templates/OPNsense/Syslog/newsyslog.conf
|
||||
/usr/local/opnsense/service/templates/OPNsense/WebGui/+TARGETS
|
||||
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.etc.ini
|
||||
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.ini
|
||||
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.lib.ini
|
||||
/usr/local/opnsense/service/tests/__init__.py
|
||||
/usr/local/opnsense/service/tests/config/config.xml
|
||||
/usr/local/opnsense/service/tests/core.py
|
||||
|
||||
@ -104,6 +104,12 @@ function webgui_configure_do($verbose = false)
|
||||
/* only stop the frontend when the generation was successful */
|
||||
killbypid('/var/run/lighty-webConfigurator.pid', 'TERM', true);
|
||||
|
||||
/* flush Phalcon volt templates */
|
||||
foreach (glob('/usr/local/opnsense/mvc/app/cache/*.php') as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
|
||||
|
||||
/* regenerate the php.ini files in case the setup has changed */
|
||||
configd_run('template reload OPNsense/WebGui');
|
||||
|
||||
|
||||
@ -227,9 +227,6 @@ echo "done."
|
||||
# Recreate capabilities DB
|
||||
/usr/bin/cap_mkdb /etc/login.conf
|
||||
|
||||
# Set up the correct php.ini content
|
||||
/usr/local/etc/rc.php_ini_setup
|
||||
|
||||
# Perform major updates
|
||||
for STAGE in B P; do
|
||||
if opnsense-update -${STAGE}; then
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/*
|
||||
This script will chroot via the builder system to test
|
||||
the local php setup. If we can perform a series of
|
||||
small tests to ensure the php environment is sane.
|
||||
*/
|
||||
|
||||
require_once('util.inc');
|
||||
require_once('xmlparse.inc');
|
||||
require_once('config.lib.inc');
|
||||
|
||||
$config = parse_config();
|
||||
|
||||
$passed_tests = true;
|
||||
|
||||
// Test config.inc
|
||||
if ($config['system']['hostname'] == '') {
|
||||
$passed_tests = false;
|
||||
}
|
||||
|
||||
// Test for php-fcgi
|
||||
$php_cgi = trim(`php-cgi -v | grep cgi-fcgi`);
|
||||
if (stristr($php_cgi, 'cgi-fcgi')) {
|
||||
echo 'FCGI-PASSED ';
|
||||
} else {
|
||||
echo 'FCGI-FAILED ';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($passed_tests) {
|
||||
echo 'PASSED';
|
||||
exit(0);
|
||||
}
|
||||
|
||||
echo 'FAILED';
|
||||
exit(1);
|
||||
Loading…
x
Reference in New Issue
Block a user