-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: urcd
action: commit
revision:
path_from:
revision_from: 6cc91f2c5468c1203d79d238f170576134a7e8ad:
path_to:
revision_to:

git.thebackupbox.net

urcd

git://git.thebackupbox.net/urcd

commit 6cc91f2c5468c1203d79d238f170576134a7e8ad
Author: root <root@d3v11.ano>
Date:   Fri Apr 12 05:11:49 2013 +0000

    [bin/add-urcstream2hub]

diff --git a/bin/add-urcstream2hub b/bin/add-urcstream2hub
new file mode 100755
index 0000000000000000000000000000000000000000..6afb7ed794c20c7aab8893da03626a5ff97152e5
--- /dev/null
+++ b/bin/add-urcstream2hub
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+[ -z $2 ] && \
+  echo $0' </path/to/sockets/> </path/to/hub/sockets>' 1>&2 && \
+  exit 64
+
+n=`ls /services | grep urcd-stream2hub | wc -l`
+
+mkdir -p /services/urcd-stream2hub$n
+
+echo '#!/bin/sh -e' > /services/urcd-stream2hub$n/run
+echo "exec ./urcstream2hub $2 ./urcstream $1" >> /services/urcd-stream2hub$n/run
+chmod +x /services/urcd-stream2hub$n/run
+
+test -L /services/urcd-stream2hub$n/urcstream || \
+  ln -s `pwd`/urcstream /services/urcd-stream2hub$n/urcstream
+
+test -L /services/urcd-stream2hub$n/urcstream2hub || \
+  ln -s `pwd`/urcstream2hub /services/urcd-stream2hub$n/urcstream2hub
+
+test -L /service/urcd-stream2hub$n || \
+  ln -s /services/urcd-stream2hub$n /service/urcd-stream2hub$n
+
+sleep 4
+svstat /service/urcd-stream2hub$n

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 15:53:36 2024