diff --git a/lgsm/config/csgoserver/_default.cfg b/lgsm/config/csgoserver/_default.cfg index 74c1f69e8..bb4b5bbba 100644 --- a/lgsm/config/csgoserver/_default.cfg +++ b/lgsm/config/csgoserver/_default.cfg @@ -85,15 +85,6 @@ engine="source" #### Directories #### # Edit with care -## Work Directories - -lockselfname=".${servicename}.lock" -lgsmdir="${rootdir}/lgsm" -functionsdir="${lgsmdir}/functions" -libdir="${lgsmdir}/lib" -tmpdir="${lgsmdir}/tmp" -filesdir="${rootdir}/serverfiles" - ## Server Specific Directories systemdir="${filesdir}/csgo" executabledir="${filesdir}" diff --git a/lgsminstall.sh b/lgsminstall.sh index b3d882db3..e9391ecb6 100644 --- a/lgsminstall.sh +++ b/lgsminstall.sh @@ -40,6 +40,18 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="feature/config" + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/exit 1" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + # LinuxGSM installer if [ "${shortname}" == "core" ]; then userinput=$1 @@ -213,21 +225,9 @@ functionfile="${FUNCNAME}" fn_boostrap_fetch_function } -# Prevent from running this script as root. -if [ "$(whoami)" = "root" ]; then - if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/exit 1" ]; then - echo "[ FAIL ] Do NOT run this script as root!" - exit 1 - else - core_functions.sh - check_root.sh - fi -fi core_dl.sh core_functions.sh - - getopt=$1 core_getopt.sh