From 71e1fad790e34a00d6fbf6ee6e47431cb8d76cbc Mon Sep 17 00:00:00 2001 From: Ben Peddell Date: Mon, 14 Sep 2015 16:09:45 +1000 Subject: [PATCH] Fix issues with user-install * Ignore the steamcmd_user when validating the environment * Add a -- separator when installing, so that --me is interpreted as an argument to the script rather than an argument to bash --- tools/arkmanager | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/arkmanager b/tools/arkmanager index b82f720..1119d7e 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -71,8 +71,10 @@ checkConfig() { echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tYour SteamCMD exec could not be found." fi # steamcmd_user - if ! getent passwd $steamcmd_user > /dev/null 2>&1 ; then - echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tYour SteamCMD user is not valid." + if [ "$steamcmd_user" != "--me" ]; then + if ! getent passwd $steamcmd_user > /dev/null 2>&1 ; then + echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tYour SteamCMD user is not valid." + fi fi # Environment configuration @@ -639,7 +641,7 @@ doUpgrade() { read -p "A new version was found! Do you want to upgrade ARK Server Tools to v${arkstLatestVersion}?" -n 1 -r echo -en "\n" if [[ $REPLY =~ ^[Yy]$ ]]; then - curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/netinstall.sh | $sudo bash -s ${steamcmd_user} ${arkstChannel} + curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/netinstall.sh | $sudo bash -s -- ${steamcmd_user} ${arkstChannel} else exit 0 fi @@ -647,7 +649,7 @@ doUpgrade() { read -p "A hotfix is available for v${arkstLatestVersion}. Do you wish to install it?" -n 1 -r echo -en "\n" if [[ $REPLY =~ ^[Yy]$ ]]; then - curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/netinstall.sh | $sudo bash -s ${steamcmd_user} ${arkstChannel} + curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/${arkstChannel}/netinstall.sh | $sudo bash -s -- ${steamcmd_user} ${arkstChannel} else exit 0 fi