summaryrefslogtreecommitdiffstats
path: root/ship/lib
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/lib
parent6c1d0f30624905e2d53d2f7a09f935b91b5a2dc1 (diff)
update tor_announce
Diffstat (limited to 'ship/lib')
-rw-r--r--ship/lib/filehooker23
1 files changed, 23 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
+}