From: Brion Vibber Date: Thu, 22 Apr 2010 04:14:40 +0000 (+0200) Subject: OStatus: CLI script to force a renewal on the given PuSH subscription. May help when... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fd9d520aeb52f7f3a3fe7c242fbe16078de1bc6e;p=quix0rs-gnu-social.git 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 --- diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php new file mode 100644 index 0000000000..121d12109a --- /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"; +}