aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-04-08 21:50:41 +0200
committerzottel <github@zottel.net>2012-04-08 21:50:41 +0200
commit315d496290747aab8b3147dc24b822460071bb2d (patch)
tree4d3cd849580d7ba3b8c30667bbb6f0901dc7d738 /include/poller.php
parentaaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b (diff)
parent5c0446975516f2b52b6cf51618e0b75af56de71b (diff)
downloadvolse-hubzilla-315d496290747aab8b3147dc24b822460071bb2d.tar.gz
volse-hubzilla-315d496290747aab8b3147dc24b822460071bb2d.tar.bz2
volse-hubzilla-315d496290747aab8b3147dc24b822460071bb2d.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php
index 90a97867c..499483d00 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -25,10 +25,20 @@ function poller_run($argv, $argc){
require_once('include/Contact.php');
require_once('include/email.php');
require_once('include/socgraph.php');
+ require_once('include/pidfile.php');
load_config('config');
load_config('system');
+ $lockpath = get_config('system','lockpath');
+ if ($lockpath != '') {
+ $pidfile = new pidfile($lockpath, 'poller.lck');
+ if($pidfile->is_already_running()) {
+ logger("poller: Already running");
+ exit;
+ }
+ }
+
$a->set_baseurl(get_config('system','url'));
load_hooks();