summaryrefslogtreecommitdiffstats
path: root/ship
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-16 12:55:24 +0100
committermakefu <github@syntax-fehler.de>2014-03-16 12:55:24 +0100
commite2cf4fc92569487e21d096ac6879177aac8f73c1 (patch)
tree501295845d6791aaefb3a9a65e02d25331c6acb2 /ship
parent6c1d0f30624905e2d53d2f7a09f935b91b5a2dc1 (diff)
update tor_announce
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