create missing dir and add fix script

This commit is contained in:
Mario Fetka 2023-01-08 12:54:07 +01:00
parent 3c6db9a833
commit 6f96569360

View File

@ -6,6 +6,7 @@ while getopts ":f:" o; do
case "${o}" in
f)
INIFILE=${OPTARG}
;;
*)
usage
;;
@ -58,6 +59,7 @@ fi
if [ $MRCCHAT_ENABLE = "true" ]; then
touch ${MYSTIC_DIR}/logs/mrcchat.${NOW}.log
touch ${MYSTIC_DIR}/logs/mrcchat.${TOMORROW}.log
mkdir -p ${MYSTIC_DIR}/data/mrc/
ln -sf ../../logs/mrcchat.${NOW}.log ${MYSTIC_DIR}/data/mrc/mrcchat.log
ln -sf mrcchat.${NOW}.log ${MYSTIC_DIR}/logs/mrcchat.log
[ -f /${MYSTIC_DIR}/logs/mrcchat.${YESTERDAY}.log ] && gzip -9 ${MYSTIC_DIR}/logs/mrcchat.${YESTERDAY}.log