aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2010-12-25 01:58:29 +0100
committerLaurent Bachelier <laurent@bachelier.name>2010-12-25 01:58:29 +0100
commit10e8c62115d5040603a660c9cedbc0518b64425b (patch)
treeb2a8722e9bbae3a458dbf428a8a59b13fb5647dc
parentMight help with Windows support? (diff)
downloadsymfttpd-10e8c62115d5040603a660c9cedbc0518b64425b.tar.xz
Detects when the lighttpd rewrite rules are changed
-rwxr-xr-xspawn10
1 files changed, 9 insertions, 1 deletions
diff --git a/spawn b/spawn
index d3a525c..5d475eb 100755
--- a/spawn
+++ b/spawn
@@ -119,10 +119,18 @@ else
if ($pid)
{
// Parent process
+ $prev_genconf = null;
while (true)
{
sleep(1);
- // TODO will do magical and revolutionary stuff
+ $handle = popen($options['php_cmd'].' '.$project_path.'/config/lighttpd.php', 'r');
+ $genconf = stream_get_contents($handle);
+ pclose($handle);
+ if ($prev_genconf !== null && $prev_genconf !== $genconf)
+ {
+ log_message('TODO restart lighttpd');
+ }
+ $prev_genconf = $genconf;
}
}
elseif ($pid == 0)