From 0ab43ef4fd9aa5ec84ca8575cfd86eea4766275c Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 21 Jun 2014 17:08:18 +0000 Subject: [PATCH] have webfinger output a JSON file in STORAGE_ROOT/webfinger/(acct/..) --- setup/web.sh | 2 ++ tools/webfinger.php | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/setup/web.sh b/setup/web.sh index 96b0397..1fda133 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -34,6 +34,8 @@ update-rc.d php-fastcgi defaults # Put our webfinger server script into a well-known location. cp tools/webfinger.php /usr/local/bin/mailinabox-webfinger.php chown www-data.www-data /usr/local/bin/mailinabox-webfinger.php +mkdir -p $STORAGE_ROOT/webfinger/acct; +chown -R $STORAGE_USER $STORAGE_ROOT/webfinger # Start services. service nginx restart diff --git a/tools/webfinger.php b/tools/webfinger.php index 2192e08..9fffbca 100755 --- a/tools/webfinger.php +++ b/tools/webfinger.php @@ -1,9 +1,42 @@ $resource, - ), JSON_PRETTY_PRINT); + echo file_get_contents($fn); + + //json_encode(array( + // subject => $resource, + //), JSON_PRETTY_PRINT); ?>