#! /bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/pre-setup-system-ssh-view-log - extract log information # # Creation: 2015-01-09 jed # Last Update: $Id$ # # Copyright (c) 2015-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------------- # exec 2>/tmp/system-ssh-pre-view-log-trace-$$.log # set -x module_name=ssh log_file=/var/log/messages log_tmp_file=/var/log/messages.${module_name} . /etc/config.d/${module_name} grep -E -h " sshd\[" ${log_file} > ${log_tmp_file} if [ $? -ne 0 ] then echo "Info: Nothing has been logged until now." > ${log_tmp_file} fi