From b80d3fc0cb9f6f464f1bd7bd36852bdd159b7bf3 Mon Sep 17 00:00:00 2001 From: Jared Ballou Date: Wed, 13 Jan 2016 06:12:51 -0500 Subject: [PATCH] Updated check_root to allow root execution for Docker. Updated insserver script with more over-complicated features nobody wants or needs. --- Insurgency/insserver | 2 +- functions/check_root.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Insurgency/insserver b/Insurgency/insserver index a0b457c46..e434bac71 100755 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -37,7 +37,7 @@ servicename="$(basename $0)" # Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. -githubuser="dgibbs64" +githubuser="jaredballou" githubrepo="linuxgsm" githubbranch="master" diff --git a/functions/check_root.sh b/functions/check_root.sh index 8f2e5ed54..148ecb30b 100644 --- a/functions/check_root.sh +++ b/functions/check_root.sh @@ -4,7 +4,10 @@ # Website: http://gameservermanagers.com lgsm_version="271215" -if [ $(whoami) = "root" ]; then +# If you want to run as root (i.e. in Docker, or just because you hate security) +# set the following variable in your environment or config scripts. +#I_KNOW_THIS_IS_A_BAD_IDEA=YES +if [ $(whoami) = "root" ] && [ "${I_KNOW_THIS_IS_A_BAD_IDEA}" != "YES" ]; then fn_printfailnl "Do NOT run this script as root!" if [ -d "${scriptlogdir}" ]; then fn_scriptlog "${selfname} attempted to run as root."