From fd9d520aeb52f7f3a3fe7c242fbe16078de1bc6e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 22 Apr 2010 06:14:40 +0200 Subject: OStatus: CLI script to force a renewal on the given PuSH subscription. May help when we get out of sync with the hub. php plugins/OStatus/scripts/resub-feed.php -smysite http://example.com/some/atom/feed --- plugins/OStatus/scripts/resub-feed.php | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 plugins/OStatus/scripts/resub-feed.php diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php new file mode 100644 index 000000000..121d12109 --- /dev/null +++ b/plugins/OStatus/scripts/resub-feed.php @@ -0,0 +1,74 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); + +$helptext = <<huburi with new subscription for $sub->uri\n"; +$ok = $sub->subscribe(); + +if ($ok) { + print "ok\n"; +} else { + print "Could not confirm.\n"; +} + +$sub2 = FeedSub::staticGet('topic', $feedurl); + +print "\n"; +print "New state:\n"; +showSub($sub2); + +function showSub($sub) +{ + print " Subscription state: $sub->sub_state\n"; + print " Verify token: $sub->verify_token\n"; + print " Signature secret: $sub->secret\n"; + print " Sub start date: $sub->sub_start\n"; + print " Record created: $sub->created\n"; + print " Record modified: $sub->modified\n"; +} -- cgit v1.2.3