summary refs log tree commit diff stats
path: root/zsh/functions/runit/renamesv
diff options
context:
space:
mode:
authorAlan Pearce2014-04-12 13:15:53 +0100
committerAlan Pearce2014-04-12 13:15:53 +0100
commit81c8016d1e296ed91af69f2d5bf435d7d657af04 (patch)
treebbccda0a7e252ce2f90bfd648fa7b5edb7d45920 /zsh/functions/runit/renamesv
parent9dd9b2972c4c526109f4fb57f936b67290ace003 (diff)
downloadnixfiles-81c8016d1e296ed91af69f2d5bf435d7d657af04.tar.lz
nixfiles-81c8016d1e296ed91af69f2d5bf435d7d657af04.tar.zst
nixfiles-81c8016d1e296ed91af69f2d5bf435d7d657af04.zip
Restructure everything to use rcm
https://github.com/thoughtbot/rcm
Diffstat (limited to 'zsh/functions/runit/renamesv')
-rw-r--r--zsh/functions/runit/renamesv36
1 files changed, 0 insertions, 36 deletions
diff --git a/zsh/functions/runit/renamesv b/zsh/functions/runit/renamesv
deleted file mode 100644
index dba1098d..00000000
--- a/zsh/functions/runit/renamesv
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env zsh
-local svdir=${SVDIR:-/service}
-if [[ -z $1 || -z $2 ]]; then
-	echo "Usage: $0 source target"
-	return 64
-fi
-
-if [[ ! -h $svdir/$1 ]]; then
-	echo $svdir/$1 does not exist
-	return 2
-fi
-
-if [[ -e $svdir/$2 ]]; then
-	echo $svdir/$2 already exists
-	return 3
-fi
-
-local servicedir=`getservicedir`
-
-if [[ ! ( -w $svdir && -w $servicedir ) ]]; then
-	echo $svdir or $servicedir is not writeable
-fi
-
-# The service doesn't have to be stopped as removing the link will do that
-# However, running the same service twice isn't a great idea, so wait here
-sv stop $1
-
-rm -f $svdir/$1 || return
-
-mv $servicedir/{$1,$2} || return
-
-ln -s {$servicedir,$svdir}/$2 || return
-
-sv start $2
-
-return