summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs/bin/tor_announce.ship
blob: bf9d58dcd84c6586505116956919f152726cf747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
#@include core
. /krebs/lib/core
#@include network
. /krebs/lib/network
#@include tor
. /krebs/lib/tor

test -w "$torrc" || ( error "$torrc is not writable!"; exit 1 ) || exit 1

configure_hidden_service
test ! -e $hidden_service_dir/hostname && \
  info "hidden service file does not exist, restarting tor" && \
  systemctl restart tor && \
  sleep 1

cat $hidden_service_dir/hostname | send_irc