mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-13 03:18:28 +00:00
Moved check for being able to write to the arkserverroot parent directory to the install function
This commit is contained in:
parent
0673866d48
commit
b4a4ecbfd4
@ -74,10 +74,6 @@ checkConfig() {
|
||||
fi
|
||||
|
||||
# Environment configuration
|
||||
# arkserverroot
|
||||
if [ ! -w `echo "$arkserverroot" | sed 's:/[^/]*$::'` ] ; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tYou have not rights to write in the defined ARK server root directory"
|
||||
fi
|
||||
# arkserverexec
|
||||
if [ ! -f "$arkserverroot/$arkserverexec" ] ; then
|
||||
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
|
||||
@ -274,7 +270,16 @@ doStop() {
|
||||
# install of ARK server
|
||||
#
|
||||
doInstall() {
|
||||
mkdir -p "$arkserverroot"
|
||||
# Check if arkserverroot already exists
|
||||
if [ ! -d "$arkserverroot" ]; then
|
||||
# If it does not exist, try create it
|
||||
echo -e "Creating the ARK server root directory ($arkserverroot)"
|
||||
mkdir -p "$arkserverroot"
|
||||
if [ ! $? ] ; then
|
||||
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tFailed to create the defined ARK server root directory ($arkserverroot)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "$steamcmdroot"
|
||||
# install the server
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user