Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kakserpom/phpdaemon
Browse files Browse the repository at this point in the history
  • Loading branch information
kakserpom committed Feb 1, 2013
2 parents 8d3bf0f + c2ea44c commit a2f34a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/ircbot
@@ -1,4 +1,4 @@
#!/opt/bin/php -q
#!/usr/bin/env php
<?php
$filename = 'phpd-ircbot.conf';
$configFile = '/etc/phpdaemon/' .$filename . '.conf;/etc/phpd/' .$filename . ';./conf/' .$filename;
Expand Down
2 changes: 1 addition & 1 deletion bin/php-chroot
@@ -1,4 +1,4 @@
#!/usr/bin/php
#!/usr/bin/env php
<?php

/*
Expand Down
2 changes: 1 addition & 1 deletion bin/phpd
@@ -1,4 +1,4 @@
#!/opt/bin/php -q
#!/usr/bin/env php
<?php

/**************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion bin/sampleapp
@@ -1,4 +1,4 @@
#!/usr/bin/php -q
#!/usr/bin/env php
<?php
$filename = 'phpd-sampleapp.conf';
$configFile = '/etc/phpdaemon/' .$filename . '.conf;/etc/phpd/' .$filename . ';./conf/' .$filename;
Expand Down
11 changes: 6 additions & 5 deletions lib/Daemon_Bootstrap.php
Expand Up @@ -66,6 +66,11 @@ class Daemon_Bootstrap {
* @return void
*/
public static function init($configFile = null) {
if (version_compare(PHP_VERSION, '5.4.0', '>=') === 1) {
Daemon::log('PHP >= 5.4.0 required.');
$error = true;
return;
}
Daemon::initSettings();
FS::init();
Daemon::$runName = basename($_SERVER['argv'][0]);
Expand Down Expand Up @@ -110,15 +115,11 @@ public static function init($configFile = null) {
if (!Daemon::$config->loadCmdLineArgs($args)) {
$error = true;
}

if (!Daemon::loadConfig(Daemon::$config->configfile->value)) {
$error = true;
}

if (version_compare(PHP_VERSION, '5.4.0', '>=') === 1) {
Daemon::log('PHP >= 5.4.0 required.');
$error = true;
}

if ('log' === $runmode) {
passthru('tail -n '.$n.' -f '.escapeshellarg(Daemon::$config->logstorage->value));
Expand Down
2 changes: 1 addition & 1 deletion lib/Thread.php
Expand Up @@ -51,7 +51,7 @@ abstract class Thread {
SIGILL => 'SIGILL',
// SIGTRAP => 'SIGTRAP',
// SIGABRT => 'SIGABRT',
7 => 'SIGEMT',
// 7 => 'SIGEMT',
SIGFPE => 'SIGFPE',
SIGBUS => 'SIGBUS',
SIGSYS => 'SIGSYS',
Expand Down

0 comments on commit a2f34a5

Please sign in to comment.