Merge remote branch 'grml-scripts/master'
[grml-scripts-core.git] / usr_bin / grml-init-multitail
diff --git a/usr_bin/grml-init-multitail b/usr_bin/grml-init-multitail
new file mode 100755 (executable)
index 0000000..20494fa
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/dash
+# Filename:      grml-init-multitail
+# Purpose:       fix tty permissions and run multitail
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>,
+#                (c) Michael Gebetsroither <gebi@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2.
+################################################################################
+
+# export variable USER for use withing GNU screen:
+  export USER=`id -un`
+
+# fix rungetty:
+  TTY=`tty`
+  sudo chown $USER.$USER $TTY
+
+# now start the shell:
+  exec /usr/bin/multitail -o 'check_mail:0' /var/log/syslog
+
+## END OF FILE #################################################################