summaryrefslogtreecommitdiff
path: root/yarns/morph.shell-lib
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-10-01 21:01:40 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-10-02 13:09:31 +0000
commitf814cf6c4a8cae6b5a28349897626d42f5fd9f9e (patch)
tree1335f96af1a2fad7521bd5c3a0fdb95cf2edb915 /yarns/morph.shell-lib
parent5ae8a2eff6f179bdb566bb1556626e708cfa1a8e (diff)
downloadmorph-f814cf6c4a8cae6b5a28349897626d42f5fd9f9e.tar.gz
Add distbuilding yarn
Deploying after distbuild currently broken
Diffstat (limited to 'yarns/morph.shell-lib')
-rw-r--r--yarns/morph.shell-lib20
1 files changed, 20 insertions, 0 deletions
diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib
index 9d67f2ab..9c13e449 100644
--- a/yarns/morph.shell-lib
+++ b/yarns/morph.shell-lib
@@ -184,3 +184,23 @@ slashify_colons()
{
echo "$1" | sed s,:,/,g
}
+
+start_cache_server(){
+ mkfifo "$1"
+ start-stop-daemon --start --pidfile="$2" \
+ --background --make-pidfile --verbose \
+ --startas="$SRCDIR/morph-cache-server" -- \
+ --port-file="$1" --no-fcgi \
+ --repo-dir="$DATADIR/gits" --direct-mode \
+ --bundle-dir="$DATADIR/bundles" \
+ --artifact-dir="$3" "$@"
+ port="$(cat "$1")"
+ rm "$1"
+ echo "$port" >"$1"
+}
+
+stop_daemon(){
+ if [ -e "$1" ]; then
+ start-stop-daemon --stop --pidfile "$1" --oknodo
+ fi
+}