diff --git a/netinstall.sh b/netinstall.sh index 1f5f9bd..b0907c3 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -12,24 +12,25 @@ tar -zxvf master.tar.gz # Install ARK Server Tools cd ark-server-tools-master/tools chmod +x install.sh -sh install.sh $1 +sh install.sh $1 > /dev/null -status = $? +status=$? # Remove the installation files rm -f master.tar.gz rm -rf /tmp/ark-server-tools-master +# Print messages +case "$status" in + "0") + echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" + ;; -if [ $status == 0 ]; then - echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" -fi - -if [ $status == 1 ]; then - echo "Something where wrong :(" -fi - -if [ $status == 2 ]; then - echo "WARNING: A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it." - echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" -fi + "1") + echo "Something where wrong :(" + ;; + "2") + echo "WARNING: A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it." + echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" + ;; +esac diff --git a/tools/install.sh b/tools/install.sh index 7918678..0de4d7b 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -20,6 +20,7 @@ if [ ! -z $1 ]; then chown $1 /var/log/arktools # Copy arkmanager.cfg inside linux configuation folder if it doesn't already exists + if [ -f /etc/arkmanager/arkmanager.cfg ]; then mkdir -p /etc/arkmanager if [ -f /etc/arkmanager/arkmanager.cfg ]; then echo "A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it.";