summary refs log tree commit diff stats
path: root/zsh/functions/runit/linksv
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/functions/runit/linksv')
-rw-r--r--zsh/functions/runit/linksv16
1 files changed, 16 insertions, 0 deletions
diff --git a/zsh/functions/runit/linksv b/zsh/functions/runit/linksv
new file mode 100644
index 00000000..7ee71094
--- /dev/null
+++ b/zsh/functions/runit/linksv
@@ -0,0 +1,16 @@
+#!/usr/bin/env zsh
+
+if [[ -z $1 ]]; then
+	echo "No service specified"
+	return 64
+fi
+
+
+if [[ ! -x $1 ]]; then
+	echo "Service does not exist in current directory"
+	return 1
+fi
+
+mv $1{,.old}
+ln -s =sv $1
+chmod -h a-w $1