summaryrefslogtreecommitdiff
path: root/svlogc
diff options
context:
space:
mode:
Diffstat (limited to 'svlogc')
-rwxr-xr-xsvlogc4
1 files changed, 4 insertions, 0 deletions
diff --git a/svlogc b/svlogc
new file mode 100755
index 0000000..7b77a67
--- /dev/null
+++ b/svlogc
@@ -0,0 +1,4 @@
+#!/sbin/sh
+
+SERV_NAME=$(echo "$1" | sed 's/\/log$//')
+[ -f /var/log/"$SERV_NAME"/current ] && tac /var/log/"$(echo "$1" | sed 's/\/log$//')"/current | less || echo "Cannot read log"