| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #!/bin/bash
- # LGSM fn_check function
- # Author: Daniel Gibbs
- # Website: http://gameservermanagers.com
- lgsm_version="271215"
- # Description: Overall function for managing checks.
- # Runs checks that will either halt on or fix an issue.
- array_contains () {
- local seeking=$1; shift
- local in=1
- for element; do
- if [ ${element} == ${seeking} ]; then
- in=0
- break
- fi
- done
- return $in
- }
- check_root.sh
- if [ "${getopt}" != "install" ]||[ "${getopt}" != "auto-install" ]; then
- check_systemdir.sh
- fi
- local allowed_commands_array=( backup console debug details map-compressor monitor start stop update validate )
- for allowed_command in "${allowed_commands_array[@]}"
- do
- if [ "${allowed_command}" == "${getopt}" ]; then
- echo "OK logs"
- check_logs.sh
- fi
- done
- local allowed_commands_array=( debug details monitor start stop )
- for allowed_command in "${allowed_commands_array[@]}"
- do
- if [ "${allowed_command}" == "${getopt}" ]; then
- check_ip.sh
- fi
- done
- local allowed_commands_array=( debug install start stop update validate )
- for allowed_command in "${allowed_commands_array[@]}"
- do
- if [ "${allowed_command}" == "${getopt}" ]; then
- check_steamuser.sh
- check_steamcmd.sh
- fi
- done
- local allowed_commands_array=( console start stop )
- for allowed_command in "${allowed_commands_array[@]}"
- do
- if [ "${allowed_command}" == "${getopt}" ]; then
- check_tmux.sh
- fi
- done
|