aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-05-20 02:04:55 +0200
committerDuncaen <mail@duncano.de>2016-05-20 02:04:55 +0200
commit9ebffda7030e1df8ab3bbfdaa27e11bf5ab32ff7 (patch)
tree515134f47a45ab897f9258af52c7962a56aecc60
parent183facabb4ec731b822a5ea71849ad35cb5060ac (diff)
downloaddotfiles-9ebffda7030e1df8ab3bbfdaa27e11bf5ab32ff7.tar.gz
bin: fix
-rwxr-xr-xbin/psgrep3
-rwxr-xr-xbin/s15
-rwxr-xr-xbin/shbin260928 -> 0 bytes
3 files changed, 6 insertions, 12 deletions
diff --git a/bin/psgrep b/bin/psgrep
deleted file mode 100755
index d747796..0000000
--- a/bin/psgrep
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-ps u $(pgrep "$1")
diff --git a/bin/s b/bin/s
index 88066f3..c8c4381 100755
--- a/bin/s
+++ b/bin/s
@@ -1,8 +1,7 @@
#!/bin/sh
-usage() {
- cat <<EOUSAGE
-Usage: s [-u <user>] [-w <sec>] <COMMAND> [SERVICE...]
+usage() cat <<EOUSAGE
+usage: s [-u <user>] [-w <sec>] <COMMAND> [SERVICE...]
COMMANDS
enable
disable
@@ -11,8 +10,6 @@ COMMANDS
reload
restart
EOUSAGE
- exit 1
-}
fatal() {
msg "$@" >&2
@@ -87,22 +84,22 @@ case "${SVUSER:=$USER}" in
;;
esac
-[ -z "$1" ] && usage
+[ -z "$1" ] && usage && exit 1
case "$1" in
ls|list) sv_list "${ETCSVDIR}" ;;
en)
- [ -z "$2" ] && usage
+ [ -z "$2" ] && usage && exit 1
[ -d "${ETCSVDIR}/$2" ] && fatal "service '$2' does not exist"
[ -h "$2" ] && fatal "service '$2' is already enabled"
ln -sfv "${ETCSVDIR}/${2}" "${SVDIR}/${2}"
;;
dis)
- [ -z "$2" ] && usage
+ [ -z "$2" ] && usage && exit 1
[ -d "${ETCSVDIR}/$2" ] && fatal "service '$2' does not exist"
[ ! -h "$2" ] && fatal "service '$2' is not enabled"
rm -v "${SVDIR}/$2"
;;
x|e|X|E|D|T|c|u|d|o|t|p|h|a|i|k|q|1|2|s|r|f|restart)
- SVDIR="${SVDIR}" "${SVCMD}" "$@"
+ SVDIR="${ETCSVDIR}" "${SVCMD}" "$@"
;;
esac
diff --git a/bin/sh b/bin/sh
deleted file mode 100755
index 079f180..0000000
--- a/bin/sh
+++ /dev/null
Binary files differ