pubsub_setup: only write topic and hub if it is new - pubsubhubbubblub - pubsubhubbub client implementation
HTML git clone git://git.codemadness.org/pubsubhubbubblub
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit eff216fd5da5e9f61dd9c408866629b97378961f
DIR parent 7d7c140fbc467e67745eb166c29f276b9d634a0a
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 28 May 2022 14:25:55 +0200
pubsub_setup: only write topic and hub if it is new
Diffstat:
M pubsub_setup | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
DIR diff --git a/pubsub_setup b/pubsub_setup
@@ -119,8 +119,10 @@ if test "${callback}" = ""; then
printf '%s\n' "${callback}" > "config/${feedname}/callback"
fi
-printf '%s\n' "${hub}" > "config/${feedname}/hub"
-printf '%s\n' "${topic}" > "config/${feedname}/topic"
+if test "$isnew" = "1"; then
+ printf '%s\n' "${hub}" > "config/${feedname}/hub"
+ printf '%s\n' "${topic}" > "config/${feedname}/topic"
+fi
status=0
if test "${dosubscribe}" = "1"; then