From 01de51b1db06de9999250f49b11e7d881d56bc78 Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:36:12 +0200 Subject: [PATCH 1/6] fixed netinstall --- netinstall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netinstall.sh b/netinstall.sh index 1f5f9bd..86d3110 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -21,15 +21,15 @@ rm -f master.tar.gz rm -rf /tmp/ark-server-tools-master -if [ $status == 0 ]; then +if [ $status -eq 0 ]; then echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" fi -if [ $status == 1 ]; then +if [ $status -eq 1 ]; then echo "Something where wrong :(" fi -if [ $status == 2 ]; then +if [ $status -eq 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 From 8f00baaaadb1db156147c66561c527de8365f958 Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:38:14 +0200 Subject: [PATCH 2/6] fixed typo --- netinstall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netinstall.sh b/netinstall.sh index 86d3110..5e64414 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -21,15 +21,15 @@ rm -f master.tar.gz rm -rf /tmp/ark-server-tools-master -if [ $status -eq 0 ]; then +if [ "$status" -eq "0" ]; then echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" fi -if [ $status -eq 1 ]; then +if [ "$status" -eq "1" ]; then echo "Something where wrong :(" fi -if [ $status -eq 2 ]; then +if [ "$status" -eq "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 From 2abfc7057c69e92218c77838e9d867af41e8decd Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:40:06 +0200 Subject: [PATCH 3/6] probably netinstaller is fixed.. --- netinstall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netinstall.sh b/netinstall.sh index 5e64414..db0a6db 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -21,15 +21,15 @@ rm -f master.tar.gz rm -rf /tmp/ark-server-tools-master -if [ "$status" -eq "0" ]; then +if (( $status == 0 )); then echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!" fi -if [ "$status" -eq "1" ]; then +if (( $status == 1 )); then echo "Something where wrong :(" fi -if [ "$status" -eq "2" ]; then +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 From 3303a43cab2009deb143d2043078b2d3d05c953d Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:44:40 +0200 Subject: [PATCH 4/6] finally fixing the netinstaller --- netinstall.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/netinstall.sh b/netinstall.sh index db0a6db..f3ca0e6 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -14,22 +14,23 @@ cd ark-server-tools-master/tools chmod +x install.sh sh install.sh $1 -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 From c6b9a70066f21026917036438d3600cabce0e414 Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:48:34 +0200 Subject: [PATCH 5/6] fixed command to copy configuration --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 1a02ac9..4cd4e1a 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -14,7 +14,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 + if [ ! -f /etc/arkmanager/arkmanager.cfg ]; then mkdir -p /etc/arkmanager cp -n arkmanager.cfg /etc/arkmanager/arkmanager.cfg chown $1 /etc/arkmanager/arkmanager.cfg From 46240bb169d2ade58c9cc99512adccd13645295f Mon Sep 17 00:00:00 2001 From: FezVrasta Date: Mon, 22 Jun 2015 10:49:02 +0200 Subject: [PATCH 6/6] don't print output of install script but use only exit codes --- netinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netinstall.sh b/netinstall.sh index f3ca0e6..b0907c3 100644 --- a/netinstall.sh +++ b/netinstall.sh @@ -12,7 +12,7 @@ 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=$?