summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs/bin/tor_announce.ship
diff options
context:
space:
mode:
Diffstat (limited to 'filehooker/root-image/krebs/bin/tor_announce.ship')
-rwxr-xr-xfilehooker/root-image/krebs/bin/tor_announce.ship9
1 files changed, 8 insertions, 1 deletions
diff --git a/filehooker/root-image/krebs/bin/tor_announce.ship b/filehooker/root-image/krebs/bin/tor_announce.ship
index bf9d58dc..ec4f33b6 100755
--- a/filehooker/root-image/krebs/bin/tor_announce.ship
+++ b/filehooker/root-image/krebs/bin/tor_announce.ship
@@ -6,6 +6,7 @@
#@include tor
. /krebs/lib/tor
+sleep_time=5
test -w "$torrc" || ( error "$torrc is not writable!"; exit 1 ) || exit 1
configure_hidden_service
@@ -14,4 +15,10 @@ test ! -e $hidden_service_dir/hostname && \
systemctl restart tor && \
sleep 1
-cat $hidden_service_dir/hostname | send_irc
+while ! internet;do
+ info "no internet yet, sleeping"
+ sleep $sleep_time
+done
+
+NICK=$(get_hostname)
+cat "$hidden_service_dir/hostname" | send_irc