summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-28 12:39:19 +0200
committerSimon Rettberg2018-03-28 12:39:19 +0200
commitfce0f4c16ca6609f375cc8683b416c5fd44fe88b (patch)
tree7ba803534415a659aaa020dd550a9f3fdc1bab48
parentapi.php: Handle --arg=val aswell, populate _GET *and* _REQUEST (diff)
downloadslx-admin-fce0f4c16ca6609f375cc8683b416c5fd44fe88b.tar.gz
slx-admin-fce0f4c16ca6609f375cc8683b416c5fd44fe88b.tar.xz
slx-admin-fce0f4c16ca6609f375cc8683b416c5fd44fe88b.zip
[sysconfig] Add api call to rebuild all config.tgz
-rwxr-xr-xinstall-all4
-rw-r--r--modules-available/sysconfig/api.inc.php6
2 files changed, 10 insertions, 0 deletions
diff --git a/install-all b/install-all
index 50efd708..1bde77f7 100755
--- a/install-all
+++ b/install-all
@@ -51,5 +51,9 @@ while true; do
fi
NEXT=$MODULE
done
+
+echo "Rebuilding config.tgz modules"
+php api.php sysconfig --action rebuild
+
echo "Done."
diff --git a/modules-available/sysconfig/api.inc.php b/modules-available/sysconfig/api.inc.php
index 897b44a7..9d621e5c 100644
--- a/modules-available/sysconfig/api.inc.php
+++ b/modules-available/sysconfig/api.inc.php
@@ -1,5 +1,11 @@
<?php
+// Called after updates to rebuild all configs
+if (Request::any('action') === 'rebuild' && isLocalExecution()) {
+ ConfigTgz::rebuildAllConfigs();
+ die('OK');
+}
+
$ip = $_SERVER['REMOTE_ADDR'];
if (substr($ip, 0, 7) === '::ffff:') {
$ip = substr($ip, 7);