Commit 9cd2b885 authored by Franco Fichtner's avatar Franco Fichtner

rc/inc: regenerate the php.ini files in a more maintainable place

parent 804a22fa
...@@ -888,6 +888,9 @@ function system_webgui_start() ...@@ -888,6 +888,9 @@ function system_webgui_start()
@unlink("{$g['varrun_path']}/lighty-webConfigurator.pid"); @unlink("{$g['varrun_path']}/lighty-webConfigurator.pid");
/* regenerate the php.ini files in case the setup has changed */
mwexec('/usr/local/etc/rc.php_ini_setup');
/* attempt to start lighthttpd */ /* attempt to start lighthttpd */
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf"); $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf");
......
...@@ -307,7 +307,7 @@ echo "done." ...@@ -307,7 +307,7 @@ echo "done."
# Recreate capabilities DB # Recreate capabilities DB
/usr/bin/cap_mkdb /etc/login.conf /usr/bin/cap_mkdb /etc/login.conf
# Run the php.ini setup file # Set up the correct php.ini content
/usr/local/etc/rc.php_ini_setup /usr/local/etc/rc.php_ini_setup
chmod u+rx /usr/local/opnsense/service/configd.py chmod u+rx /usr/local/opnsense/service/configd.py
......
...@@ -47,7 +47,6 @@ pkg upgrade -y ...@@ -47,7 +47,6 @@ pkg upgrade -y
echo echo
# restart the GUI after PHP changes have been applied # restart the GUI after PHP changes have been applied
/usr/local/etc/rc.php_ini_setup
/usr/local/etc/rc.restart_webgui /usr/local/etc/rc.restart_webgui
echo echo
......
...@@ -36,25 +36,20 @@ PKG_PROGRESS_FILE=/tmp/pkg_upgrade.progress ...@@ -36,25 +36,20 @@ PKG_PROGRESS_FILE=/tmp/pkg_upgrade.progress
if [ -z "$pkg_running" ]; then if [ -z "$pkg_running" ]; then
echo "***GOT REQUEST TO UPGRADE: $package***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO UPGRADE: $package***" >> ${PKG_PROGRESS_FILE}
if [ "$package" == "all" ]; then if [ "$package" == "all" ]; then
# start pkg upgrade echo '***STARTING UPGRADE***' >> ${PKG_PROGRESS_FILE}
echo '***STARTING UPGRADE***' >> ${PKG_PROGRESS_FILE}
pkg upgrade -y >> ${PKG_PROGRESS_FILE} pkg upgrade -y >> ${PKG_PROGRESS_FILE}
echo '***CHECKING FOR MORE UPGRADES, CAN TAKE 30 SECONDS***' >> ${PKG_PROGRESS_FILE}
/usr/local/opnsense/scripts/pkg_updatecheck.sh
echo '***DONE***' >> ${PKG_PROGRESS_FILE}
else else
# start pkg upgrade # XXX this is dangerous and not recommended by pkgng devs
echo '***STARTING UPGRADE - ONE PACKAGE***' >> ${PKG_PROGRESS_FILE} echo '***STARTING UPGRADE - ONE PACKAGE***' >> ${PKG_PROGRESS_FILE}
pkg upgrade -y $package >> ${PKG_PROGRESS_FILE} pkg upgrade -y $package >> ${PKG_PROGRESS_FILE}
echo '***CHECKING FOR MORE UPGRADES, CAN TAKE 30 SECONDS***' >> ${PKG_PROGRESS_FILE}
/usr/local/opnsense/scripts/pkg_updatecheck.sh
echo '***DONE***' >> ${PKG_PROGRESS_FILE}
fi fi
echo '***CHECKING FOR MORE UPGRADES, CAN TAKE 30 SECONDS***' >> ${PKG_PROGRESS_FILE}
/usr/local/opnsense/scripts/pkg_updatecheck.sh
# remove no longer referenced packages # remove no longer referenced packages
pkg autoremove -y >> ${PKG_PROGRESS_FILE} pkg autoremove -y >> ${PKG_PROGRESS_FILE}
# regenerate php.ini and restart the web server # restart the web server
/usr/local/etc/rc.php_ini_setup >> ${PKG_PROGRESS_FILE}
/usr/local/opnsense/service/configd_ctl.py 'service restart webgui' >> ${PKG_PROGRESS_FILE} /usr/local/opnsense/service/configd_ctl.py 'service restart webgui' >> ${PKG_PROGRESS_FILE}
echo '***DONE***' >> ${PKG_PROGRESS_FILE}
else else
echo 'Upgrade already in progress' >> ${PKG_PROGRESS_FILE} echo 'Upgrade already in progress' >> ${PKG_PROGRESS_FILE}
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment