Skip to content

Commit 3386053

Browse files
committed
webgui: clean up after rework
1 parent f532215 commit 3386053

File tree

7 files changed

+11
-60
lines changed

7 files changed

+11
-60
lines changed

+POST_INSTALL

-9
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,4 @@ if /usr/local/etc/rc.d/configd status > /dev/null; then
4444
/usr/local/etc/rc.d/configd restart
4545
fi
4646

47-
echo "Flush Phalcon volt templates"
48-
rm -f /usr/local/opnsense/mvc/app/cache/*.php
49-
50-
echo "Reloading GUI configuration"
51-
/usr/local/etc/rc.php_ini_setup
52-
if pgrep -q php-cgi; then
53-
pkill -HUP php-cgi
54-
fi
55-
5647
/usr/local/etc/rc.configure_firmware

Makefile

-7
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,6 @@ style: want-pear-PHP_CodeSniffer
306306
style-fix: want-pear-PHP_CodeSniffer
307307
phpcbf --standard=ruleset.xml ${.CURDIR}/src/opnsense || true
308308

309-
setup: force
310-
${.CURDIR}/src/etc/rc.php_ini_setup
311-
312-
health: force
313-
# check test script output and advertise a failure...
314-
[ "`${.CURDIR}/src/etc/rc.php_test_run`" == "FCGI-PASSED PASSED" ]
315-
316309
test: want-phpunit
317310
@cd ${.CURDIR}/src/opnsense/mvc/tests && \
318311
phpunit --configuration PHPunit.xml

Mk/tree.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ install-${TARGET}: force
8383

8484
plist-${TARGET}: force
8585
.for TREE in ${TREES_${TARGET}}
86-
@(cd ${TREE}; find * -type f ${_IGNORES}) | while read FILE; do \
86+
@(cd ${TREE}; find * -type f ${_IGNORES} -o -type l) | while read FILE; do \
8787
FILE="$${FILE%%.in}"; PREFIX=""; \
8888
if [ -z "${NO_SAMPLE}" -a "$${FILE%%.sample}" != "$${FILE}" ]; then \
8989
PREFIX="@sample "; \

plist

+4-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@
122122
/usr/local/etc/rc.newwanip
123123
/usr/local/etc/rc.newwanipv6
124124
/usr/local/etc/rc.openvpn
125-
/usr/local/etc/rc.php_ini_setup
126-
/usr/local/etc/rc.php_test_run
127125
/usr/local/etc/rc.reboot
128126
/usr/local/etc/rc.recover
129127
/usr/local/etc/rc.reload_all
@@ -722,6 +720,10 @@
722720
/usr/local/opnsense/service/templates/OPNsense/Sample/sub2/example_sub2.txt
723721
/usr/local/opnsense/service/templates/OPNsense/Syslog/+TARGETS
724722
/usr/local/opnsense/service/templates/OPNsense/Syslog/newsyslog.conf
723+
/usr/local/opnsense/service/templates/OPNsense/WebGui/+TARGETS
724+
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.etc.ini
725+
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.ini
726+
/usr/local/opnsense/service/templates/OPNsense/WebGui/php.lib.ini
725727
/usr/local/opnsense/service/tests/__init__.py
726728
/usr/local/opnsense/service/tests/config/config.xml
727729
/usr/local/opnsense/service/tests/core.py

src/etc/inc/plugins.inc.d/webgui.inc

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ function webgui_configure_do($verbose = false)
104104
/* only stop the frontend when the generation was successful */
105105
killbypid('/var/run/lighty-webConfigurator.pid', 'TERM', true);
106106

107+
/* flush Phalcon volt templates */
108+
foreach (glob('/usr/local/opnsense/mvc/app/cache/*.php') as $filename) {
109+
unlink($filename);
110+
}
111+
112+
107113
/* regenerate the php.ini files in case the setup has changed */
108114
configd_run('template reload OPNsense/WebGui');
109115

src/etc/rc

-3
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ echo "done."
227227
# Recreate capabilities DB
228228
/usr/bin/cap_mkdb /etc/login.conf
229229

230-
# Set up the correct php.ini content
231-
/usr/local/etc/rc.php_ini_setup
232-
233230
# Perform major updates
234231
for STAGE in B P; do
235232
if opnsense-update -${STAGE}; then

src/etc/rc.php_test_run

-38
This file was deleted.

0 commit comments

Comments
 (0)