Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
73e3e90c
Commit
73e3e90c
authored
9 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple ipns-republish script stopgap
parent
fc8d2258
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
bin/ipns-republish
bin/ipns-republish
+33
-0
No files found.
bin/ipns-republish
0 → 100755
View file @
73e3e90c
#!/bin/bash
if
[
"$#"
-ne
1
]
;
then
echo
"usage:
$0
<ipfs-or-ipns-path>"
echo
"republishes an ipns name every 20 minutes"
echo
"(this is an icky stop-gap until ipfs nodes do it for you)"
echo
""
echo
"example:"
echo
" >
$0
QmSYCpuKPbPQ2iFr2swJj2hvz7wQUXfPBXPiuVsQdL5FEs"
echo
""
exit
1
fi
# must be run online.
ipfs swarm peers
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"error: ipfs daemon must be online and connected to peers "
exit
1
fi
# check the object is there
ipfs object
stat
"
$1
"
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"error: ipfs cannot find
$1
"
exit
1
fi
echo
"republishing
$1
every 20 minutes"
while
:
do
ipfs name publish
$1
sleep
1200
done
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment