Răsfoiți Sursa

added functionality for auto-install

Daniel Gibbs 11 ani în urmă
părinte
comite
1e4b299bbe
1 a modificat fișierele cu 7 adăugiri și 2 ștergeri
  1. 7 2
      functions/fn_serverconfig

+ 7 - 2
functions/fn_serverconfig

@@ -27,7 +27,12 @@ echo ""
 echo "Configuring ${gamename} Server"
 echo "================================="
 sleep 1
-read -p "Enter server name: " servername
-read -p "Enter rcon password: " rconpass
+if [ -z ${autoinstall} ]; then
+	read -p "Enter server name: " servername
+	read -p "Enter rcon password: " rconpass
+else
+	servername="${servicename}"
+	rconpass="${rconpass}"
+fi
 sed -i "s/\"hostname\"/\"${servername}\"/g" ${servercfgfullpath}
 sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" ${servercfgfullpath}