diff options
Diffstat (limited to 'ship/lib/filehooker')
-rw-r--r-- | ship/lib/filehooker | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ship/lib/filehooker b/ship/lib/filehooker index a2fba840..3c881f91 100644 --- a/ship/lib/filehooker +++ b/ship/lib/filehooker @@ -1,4 +1,5 @@ #@include core +#@include network ncdc_user=${ncdc_user:-hooker} ncdc_bin=${ncdc_bin:-/usr/bin/ncdc} @@ -90,3 +91,27 @@ prepare_netshares(){ fi done } +install_tor_announce(){ +# systemd only +info "writing tor_announce.service" +cat > /etc/systemd/system/tor_announce.service<<EOF +[Unit] +Description=Announce Tor Hidden Address +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/tor_announce + +[Install] +WantedBy=multi-user.target +EOF +info "writing tor_announce to /usr/bin/tor_announce" +printf '#!/bin/sh\nsleep 20\n' > /usr/bin/tor_announce +http_get conf.krebsco.de/tor_publish_ssh >> /usr/bin/tor_announce +chmod +x /usr/bin/tor_announce +info "enable tor_announce" +systemctl enable tor_announce +#systemctl start tor_announce +} |