Removed the creation of a user, script now expects to be ran as the user looking to install 7D2D-Manage
This commit is contained in:
parent
b64a8c115d
commit
8e7a7ab91d
10
install.bash
10
install.bash
@ -5,9 +5,8 @@ set -e
|
||||
|
||||
GIT_DIR="${HOME}/7-Days-To-Die-Temp"
|
||||
GENERAL_MODULE_PATH="${GIT_DIR}/Scripts/general"
|
||||
SDTD_USER_NAME="sdtd"
|
||||
SDTD_USER_HOME="/home/${SDTD_USER_NAME}/"
|
||||
SDTD_BIN_DIR="${SDTD_USER_HOME}/.bin"
|
||||
SDTD_USER_HOME="${HOME}"
|
||||
SDTD_BIN_DIR="${HOME}/.bin"
|
||||
|
||||
# Get the repo as this script SHOULD be a copy paste into a terminal, so we have to pull this down
|
||||
git clone --recurse-submodules https://gitlab.orion-technologies.io/game-servers/7-days-to-die.git "${GIT_DIR}"
|
||||
@ -15,9 +14,6 @@ git clone --recurse-submodules https://gitlab.orion-technologies.io/game-servers
|
||||
# Run general installation from the general submodule
|
||||
/bin/bash "${GENERAL_MODULE_PATH}/install.bash"
|
||||
|
||||
# Create the user
|
||||
sudo useradd -m -s /bin/bash "${SDTD_USER_NAME}"
|
||||
|
||||
# Create the user .bin directory, I prefer .bin in scenarios in which I need
|
||||
# significant user segmentation, e.g. I have some users running a different game
|
||||
# and only this user managing 7 Days to Die; considering that these scripts are
|
||||
@ -47,6 +43,8 @@ echo "export PATH=\${PATH}:/usr/local/bin" >> "${SDTD_USER_HOME}/.bash_profile"
|
||||
# Ensure the completions are being sourced
|
||||
echo "source ~/.bin/7D2D-Manage-Completions" >> "${SDTD_USER_HOME}/.bash_profile"
|
||||
|
||||
rm -rf "${GIT_DIR}"
|
||||
|
||||
echo "Finished with installation."
|
||||
echo "To try it out as the user paste the following:"
|
||||
echo "su ${SDTD_USER_NAME} && cd ${HOME} && source .bash_profile && 7D2D-Manage -h"
|
||||
|
Loading…
Reference in New Issue
Block a user