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()
@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 */
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf");
......
......@@ -307,7 +307,7 @@ echo "done."
# Recreate capabilities DB
/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
chmod u+rx /usr/local/opnsense/service/configd.py
......
......@@ -47,7 +47,6 @@ pkg upgrade -y
echo
# restart the GUI after PHP changes have been applied
/usr/local/etc/rc.php_ini_setup
/usr/local/etc/rc.restart_webgui
echo
......
......@@ -36,25 +36,20 @@ PKG_PROGRESS_FILE=/tmp/pkg_upgrade.progress
if [ -z "$pkg_running" ]; then
echo "***GOT REQUEST TO UPGRADE: $package***" >> ${PKG_PROGRESS_FILE}
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}
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
# start pkg upgrade
echo '***STARTING UPGRADE - ONE PACKAGE***' >> ${PKG_PROGRESS_FILE}
# XXX this is dangerous and not recommended by pkgng devs
echo '***STARTING UPGRADE - ONE 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
echo '***CHECKING FOR MORE UPGRADES, CAN TAKE 30 SECONDS***' >> ${PKG_PROGRESS_FILE}
/usr/local/opnsense/scripts/pkg_updatecheck.sh
# remove no longer referenced packages
pkg autoremove -y >> ${PKG_PROGRESS_FILE}
# regenerate php.ini and restart the web server
/usr/local/etc/rc.php_ini_setup >> ${PKG_PROGRESS_FILE}
# restart the web server
/usr/local/opnsense/service/configd_ctl.py 'service restart webgui' >> ${PKG_PROGRESS_FILE}
echo '***DONE***' >> ${PKG_PROGRESS_FILE}
else
echo 'Upgrade already in progress' >> ${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