summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
committerYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
commita5bbb2bec133bdee08b361628f32430ae3884107 (patch)
treeb203105149ec234ebe155d5718d2cbb6390b4a45 /update.php
parent12727ad17d125eb2f3f243231ccca1cb0a5a7b4b (diff)
parent2f43089de1ead3f164b8b31967d1abbb784319fa (diff)
Merge pull request #1 from gothfox/master
Update from original
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/update.php b/update.php
index ff6b82503..521b956ad 100755
--- a/update.php
+++ b/update.php
@@ -42,6 +42,13 @@
$options = getopt("", $longopts);
+ if (!is_array($options)) {
+ die("error: getopt() failed. ".
+ "Most probably you are using PHP CGI to run this script ".
+ "instead of required PHP CLI. Check tt-rss wiki page on updating feeds for ".
+ "additional information.\n");
+ }
+
if (count($options) == 0 && !defined('STDIN')) {
?> <html>
<head>
@@ -162,8 +169,9 @@
if (isset($options["daemon"])) {
while (true) {
$quiet = (isset($options["quiet"])) ? "--quiet" : "";
+ $log = isset($options['log']) ? '--log '.$options['log'] : '';
- passthru(PHP_EXECUTABLE . " " . $argv[0] ." --daemon-loop $quiet");
+ passthru(PHP_EXECUTABLE . " " . $argv[0] ." --daemon-loop $quiet $log");
_debug("Sleeping for " . DAEMON_SLEEP_INTERVAL . " seconds...");
sleep(DAEMON_SLEEP_INTERVAL);
}