Index: scripts/usr/local/bin/7dtd-common.sh
===================================================================
--- scripts/usr/local/bin/7dtd-common.sh	(revision 15)
+++ scripts/usr/local/bin/7dtd-common.sh	(revision 16)
@@ -91,6 +91,5 @@
 #   PID otherwise
 getInstancePID() {
-	run=$(isRunning $1)
-	if [ $run -eq 1 ]; then
+	if [ $(isRunning $1) -eq 1 ]; then
 		cat $(getInstancePath $1)/7dtd.pid
 	else
Index: scripts/usr/local/bin/7dtd-instances.sh
===================================================================
--- scripts/usr/local/bin/7dtd-instances.sh	(revision 15)
+++ scripts/usr/local/bin/7dtd-instances.sh	(revision 16)
@@ -14,6 +14,5 @@
 	echo ${line// /-}
 	for I in $(getInstanceList); do
-		run=$(isRunning $I)
-		if [ $run -eq 1 ]; then
+		if [ $(isRunning $I) -eq 1 ]; then
 			run="yes"
 			tel=$(telnetCommand $I lp)
@@ -44,6 +43,5 @@
 	echo
 
-	res=$(isRunning $1)
-	if [ $res -eq 1 ]; then
+	if [ $(isRunning $1) -eq 1 ]; then
 		echo "Status: Running"
 		echo "Open ports:"
Index: scripts/usr/local/bin/7dtd-running.sh
===================================================================
--- scripts/usr/local/bin/7dtd-running.sh	(revision 15)
+++ scripts/usr/local/bin/7dtd-running.sh	(revision 16)
@@ -14,6 +14,5 @@
 checkInstanceValid $1
 
-res=$(isRunning $1)
-if [ $res -eq 1 ]; then
+if [ $(isRunning $1) -eq 1 ]; then
 	echo "7dtd instance $1 is running"
 	echo "Open ports:"
Index: scripts/usr/local/bin/7dtd-start.sh
===================================================================
--- scripts/usr/local/bin/7dtd-start.sh	(revision 15)
+++ scripts/usr/local/bin/7dtd-start.sh	(revision 16)
@@ -15,6 +15,5 @@
 checkInstanceValid $1
 
-res=$(isRunning $1)
-if [ $res -eq 0 ]; then
+if [ $(isRunning $1) -eq 0 ]; then
 	if [ ! `pgrep Xvfb` ]; then
 		echo "Xvfb not yet running. Starting..."
@@ -31,6 +30,5 @@
 	start-stop-daemon --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_ROOT --exec $WINE -- $SDTD_ROOT/7DaysToDie.exe $OPTS > $(getInstancePath $1)/stdout.log 2>&1
 	sleep 1
-	res=$(isRunning $1)
-	if [ $res -eq 1 ]; then
+	if [ $(isRunning $1) -eq 1 ]; then
 		echo "Done!"
 		exit 0
Index: scripts/usr/local/bin/7dtd-update.sh
===================================================================
--- scripts/usr/local/bin/7dtd-update.sh	(revision 15)
+++ scripts/usr/local/bin/7dtd-update.sh	(revision 16)
@@ -5,8 +5,6 @@
 checkRootLoadConf
 
-for I in $SDTD_BASE/instances/*; do
-	ins=`basename $I`
-	run=$(isRunning $ins)
-	if [ $run -eq 1 ]; then
+for I in $(getInstanceList); do
+	if [ $(isRunning $I) -eq 1 ]; then
 		echo "At least one instance is still running."
 		echo "Before updating the engine please stop all instances!"
