gameservergame-servergame-servershacktoberfestdedicated-game-serversgamelinuxgsmserverbashgaminglinuxmultiplayer-game-servershell
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
736 B
26 lines
736 B
#!/bin/bash
|
|
# LinuxGSM check_logs.sh module
|
|
# Author: Daniel Gibbs
|
|
# Contributors: http://linuxgsm.com/contrib
|
|
# Website: https://linuxgsm.com
|
|
# Description: Checks if log files exist.
|
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
|
|
|
fn_check_logs() {
|
|
fn_print_dots "Checking for log files"
|
|
fn_print_info_nl "Checking for log files: Creating log files"
|
|
checklogs=1
|
|
install_logs.sh
|
|
}
|
|
|
|
# Create directories for the script and console logs.
|
|
if [ ! -d "${lgsmlogdir}" ] || [ ! -d "${consolelogdir}" ]; then
|
|
fn_check_logs
|
|
fi
|
|
|
|
# Create gamelogdir.
|
|
# If variable exists gamelogdir exists and log/server does not.
|
|
if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then
|
|
fn_check_logs
|
|
fi
|
|
|