X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpoller.php;fp=include%2Fpoller.php;h=499483d007dea6ecaffde1d9c4d0fffb420e79e3;hb=cb05801a9031254f5882038de07a3ee4d5f89dd0;hp=90a97867c204e5abae28479262c8729e5320b242;hpb=0fa3b7f348c3deeb85cb5f5f9bd35ba47b0e92ee;p=friendica.git diff --git a/include/poller.php b/include/poller.php index 90a97867c2..499483d007 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();