summaryrefslogtreecommitdiffstats
path: root/ship
diff options
context:
space:
mode:
Diffstat (limited to 'ship')
-rw-r--r--ship/lib/filehooker23
-rw-r--r--ship/src/install_tor_announce5
2 files changed, 28 insertions, 0 deletions
diff --git a/ship/lib/filehooker b/ship/lib/filehooker
index a6987733..5e6def5d 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}
@@ -60,3 +61,25 @@ WantedBy=multi-user.target
EOF
systemctl enable ncdc@$ncdc_user
}
+
+install_tor_announce(){
+# systemd only
+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
+
+http_get conf.krebsco.de/tor_publish_ssh > /usr/bin/tor_annouce
+chmod +x /usr/bin/tor_annouce
+systemctl enable tor_announce
+systemctl start tor_announce
+}
diff --git a/ship/src/install_tor_announce b/ship/src/install_tor_announce
new file mode 100644
index 00000000..b7b3662e
--- /dev/null
+++ b/ship/src/install_tor_announce
@@ -0,0 +1,5 @@
+#!/bin/sh
+#@strict
+#@include filehooker
+
+install_tor_announce