#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/pre-setup-services-haveged-logfileview # # Creation : 2019-01-17 se, sebastian(dot)ertz(at)tk(minus)ertz(dot)de # Last Update: $Id$ # # Copyright (c) 2019-@@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. #---------------------------------------------------------------------------- package_name=haveged log_dir=/var/log/ log_file=messages.haveged grep -E -h "[[:blank:]]${package_name}:" /var/log/messages > ${log_dir}${log_file} if [ ${?} -ne 0 ] then echo "Info: Nothing has been logged until now." > ${log_dir}${log_file} fi chmod 0640 ${log_dir}${log_file} chown root:root ${log_dir}${log_file} # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------