#!/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/antispam-pre-view-log - view log file # # Copyright (c) 2001-2024 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2002-12-01 jed # Last Update: $Id$ # # 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. #---------------------------------------------------------------------------------- # read eislib etc. . /var/install/include/eislib antispam_config_path=/var/antispam log_dir=/var/log log_file='' log_file1=${log_dir}/antispam\*.log log_file2=${log_dir}/antispam.log ### view log file ### if [ -f "${log_file1}" ] then log_file=${log_file1} elif [ -f "${log_file2}" ] then log_file=${log_file2} fi if [ -n "${log_file}" -a -s "${log_file}" ] then ln -sf "${log_file}" ${antispam_config_path}/antispam.log else rm -f ${antispam_config_path}/antispam.log fi