feat: "server_exists" check

This commit is contained in:
2020-08-08 06:14:17 +03:00
parent d7502e7cbe
commit 2dbd001d3c
28 changed files with 111 additions and 262 deletions

View File

@ -18,7 +18,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
function game_fix_permissions () # $*: Instance[s]
{
local InstanceList="$*"
@ -100,12 +100,6 @@ function game_validate ()
instance_start
}
function server_exists ()
{
test -x "$AppBin"
return $?
}
function first_install ()
{
include /etc/steamcmd/steamcmd.conf

View File

@ -65,10 +65,6 @@ function instance_add () # $*: InstanceName[s]
if [[ -z "$*" ]]; then
echo "Name of instance[s] must be set"
exit 1
elif ! server_exists; then
echo "You must install server first"
echo "Run \"${ScriptName}${KF2POSTFIX} game update\" to install it"
exit 1
fi
local MaxGamePort='7777'