mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-24 07:28:27 +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
|
fi
|
||||||
|
|
||||||
# Environment configuration
|
# 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
|
# arkserverexec
|
||||||
if [ ! -f "$arkserverroot/$arkserverexec" ] ; then
|
if [ ! -f "$arkserverroot/$arkserverexec" ] ; then
|
||||||
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
|
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
|
||||||
@ -274,7 +270,16 @@ doStop() {
|
|||||||
# install of ARK server
|
# install of ARK server
|
||||||
#
|
#
|
||||||
doInstall() {
|
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"
|
cd "$steamcmdroot"
|
||||||
# install the server
|
# install the server
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user