Răsfoiți Sursa

Merge branch 'develop' into feature/rtcwserver

Daniel Gibbs 7 ani în urmă
părinte
comite
319dca3d9e

+ 5 - 7
.github/ISSUE_TEMPLATE/bug_report.md

@@ -17,19 +17,19 @@ Issues here are **NOT** for:
 * Dedicated server issues (e.g Ubuntu, CentOS)
 * Anything not directly related to LinuxGSM development
 
-Any general support issues on GitHub will be closed.
+Any general support issues on GitHub will be migrated to [LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support).
 
 *Please use the template below*
 
 ## User Story
 
-As a \[user description], I want \[desired action] so that \[desired outcome]
+As a [user description], I want [desired action] so that [desired outcome].
 
 ## Basic info
 
-* Distro \[Ubuntu 18.04]
-* Game \[Garry's Mod]
-* Feature \[Monitor]
+* Distro: [Ubuntu 18.04]
+* Game: [Garry's Mod]
+* Command: [Monitor]
 
 ## Further Information
 
@@ -44,5 +44,3 @@ Steps to reproduce the behaviour:
 4. See error
 
 ## Expected behaviour
-
-A what you expected to happen.

+ 6 - 7
.github/ISSUE_TEMPLATE/feature_request.md

@@ -12,25 +12,24 @@ Issues here are **ONLY** for:
 * code contributions
 
 Issues here are **NOT** for:
-
 * General support
 * Specific game server issues (e.g CS:GO, TF2)
 * Dedicated server issues (e.g Ubuntu, CentOS)
 * Anything not directly related to LinuxGSM development
 
-Any general support issues on GitHub will be closed.
+Any general support issues on GitHub will be migrated to [LinuxGSM-Support](https://github.com/GameServerManagers/LinuxGSM-Support).
 
 *Please use the template below*
 
 ## User Story
 
-As a \[user description], I want \[desired action] so that \[desired outcome]
+As a [user description], I want [desired action] so that [desired outcome].
 
-## Basic info 
+## Basic info
 
-* Distro \[Ubuntu 18.04]
-* Game \[Garry's Mod]
-* Feature \[Monitor]
+* Distro: [Ubuntu 18.04]
+* Game: [Garry's Mod]
+* Command: [Monitor]
 
 ## Further Information
 

+ 12 - 2
.github/ISSUE_TEMPLATE/new-server-request.md

@@ -4,7 +4,9 @@ about: Suggest a new game server to be added
 
 ---
 
-## Which game server would you like adding?
+## What game server would you like adding?
+
+[game server]
 
 ## Can you link to any tutorials or guides?
 
@@ -12,8 +14,16 @@ Provide any useful documentation or resources that might help.
 
 ## Is the server on Steam?
 
-If yes Use SteamDB to get the appid. (https://steamdb.info)
+* [ ] Yes
+* [ ] No
+
+If yes Use SteamDB to get the appid. (https://steamdb.info).
+
+[appid]
 
 ## Is the server supported on Linux?
 
 We only support Linux servers and do not support Wine.
+
+* [ ] Yes
+* [ ] No

+ 13 - 3
.github/lock.yml

@@ -1,9 +1,13 @@
-# Configuration for lock-threads - https://github.com/dessant/lock-threads
+# Configuration for Lock Threads - https://github.com/dessant/lock-threads
 
 # Number of days of inactivity before a closed issue or pull request is locked
 daysUntilLock: 365
 
-# Issues and pull requests with these labels will not be locked. Set to `[]` to disable
+# Skip issues and pull requests created before a given timestamp. Timestamp must
+# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
+skipCreatedBefore: false
+
+# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
 exemptLabels: []
 
 # Label to add before locking, such as `outdated`. Set to `false` to disable
@@ -15,6 +19,9 @@ lockComment: >
   any recent activity after it was closed. Please open a new issue for
   related bugs.
 
+# Assign `resolved` as the reason for locking. Set to `false` to disable
+setLockReason: false
+
 # Limit to only `issues` or `pulls`
 # only: issues
 
@@ -25,4 +32,7 @@ lockComment: >
 #   lockLabel: outdated
 
 # pulls:
-#   daysUntilLock: 30
+#   daysUntilLock: 30
+
+# Repository to extend settings from
+# _extends: repo

+ 2 - 2
.github/no-response.yml

@@ -1,9 +1,9 @@
 # Configuration for probot-no-response - https://github.com/probot/no-response
 
 # Number of days of inactivity before an Issue is closed for lack of response
-daysUntilClose: 30
+daysUntilClose: 60
 # Label requiring a response
-responseRequiredLabel: "Status: waiting response"
+responseRequiredLabel: "needs more info"
 # Comment to post when closing an Issue for lack of response. Set to `false` to disable
 closeComment: >
   This issue has been automatically closed because there has been no response

+ 2 - 2
.github/potential-duplicates.yml

@@ -1,6 +1,6 @@
 # Label name and color to set, when potential duplicates are detected
-issueLabel: "Type: potential duplicate"
-labelColor: D2DAE1
+issueLabel: "duplicate"
+labelColor: 579e01
 
 # If similarity is higher than this threshold, issue will be marked as duplicate
 threshold: 0.60

+ 4 - 2
.github/request-info.yml

@@ -2,7 +2,9 @@
 
 # *Required* Comment to reply with
 requestInfoReplyComment: >
-  We require more information for this issue.
+  ![More Data required](https://i.imgur.com/yS9cecv.png)
+  More data is required to assist with this issue 
+  or issue template was not used correctly.
   https://linuxgsm.com/support/#guide
 
 # *OPTIONAL* default titles to check against for lack of descriptiveness
@@ -12,4 +14,4 @@ requestInfoReplyComment: >
 #  - updates
 
 # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
-requestInfoLabelToAdd: "Status: needs more info"
+requestInfoLabelToAdd: "needs more info"

+ 3 - 3
.github/welcome.yml

@@ -4,18 +4,18 @@
 
 # Comment to be posted to on first time issues
 newIssueWelcomeComment: >
-  Thanks for opening your first issue. Be sure to follow the issue template! and guide for posting. https://linuxgsm.com/support/#guide
+  Thank you for opening your first issue. Be sure to follow the issue template! and guide for posting. https://linuxgsm.com/support/#guide
 
 # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
 
 # Comment to be posted to on PRs from first time contributors in your repository
 newPRWelcomeComment: >
-  Thanks for opening this pull request! Please check out our contributing guidelines.
+  Thank you for opening this pull request! Please check out our contributing guidelines.
 
 # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
 
 # Comment to be posted to on pull requests merged by a first time user
 firstPRMergeComment: >
-  Congrats on merging your first pull request! Thank you for supporting LinuxGSM!
+  Congratulations on merging your first pull request! Thank you for supporting LinuxGSM!
 
 # It is recommend to include as many gifs and emojis as possible

+ 4 - 6
CONTRIBUTING.md

@@ -9,15 +9,13 @@ Before working on a project we recommend that you create a issue in regards to t
 Here are some important resources:
 
   * [Issues Page](https://github.com/GameServerManagers/LinuxGSM/issues) provides a list of areas that could use some work,
-  * [Developing LinuxGSM](https://docs.linuxgsm.com/developers) gives a detailed guide on developing LGSM,
-  * [LinuxGSM Exit Codes](https://docs.linuxgsm.com/developers/linuxgsm-exit-codes) describes and gives an explanation for exit codes,
-  * [Branching](https://docs.linuxgsm.com/developers/branching) is our final guide to submitting changes.
+  * [Developer Wiki](https://github.com/GameServerManagers/LinuxGSM/wiki) gives a detailed guide on developing LGSM,
 
 ## Testing
 
 Please make sure all the code you write is working properly **before** you create a pull request. Information on debugging can be found in the following document:
-[Developer Commands](https://docs.linuxgsm.com/developers/developer-commands)
-[Debugging your code](https://docs.linuxgsm.com/developers/developing-lgsm#testing-and-debugging-your-code)
+
+[Developer Commands](https://github.com/GameServerManagers/LinuxGSM/wiki/Developer-Commands)
 
 ## Submitting changes
 
@@ -35,4 +33,4 @@ This will help us in understanding your code and determining where problems may
 Start reading our code and you'll get the hang of it. Explore how functions are organized and you'll see how we strive for readable code.
 
 Please give the following document a read and adjust your code according to its specifications.
-[Syntax & Coding Conventions](https://docs.linuxgsm.com/developers/syntax-and-conventions)
+[Syntax & Coding Conventions](https://github.com/GameServerManagers/LinuxGSM/wiki/Syntax-and-Conventions)

+ 23 - 0
PULL_REQUEST_TEMPLATE.md

@@ -0,0 +1,23 @@
+# Description
+
+Please include a summary of the change and which issue is fixed.
+
+Fixes #\[issue]
+
+## Type of change
+
+* [ ] Bug fix (change which fixes an issue)
+* [ ] New feature (change which adds functionality)
+* [ ] New Server (new server added)
+* [ ] Refactor (restructures existing code)
+* [ ] This change requires a documentation update
+
+## Checklist
+
+* [ ] My code follows the style guidelines of this project
+* [ ] This pull request links to an issue
+* [ ] This pull request uses the `develop` branch as its base 
+* [ ] I have performed a self-review of my own code
+* [ ] I have squashed commits
+* [ ] I have commented my code, particularly in hard to understand areas
+* [ ] I have made corresponding changes to the documentation if required

Fișier diff suprimat deoarece este prea mare
+ 1 - 1
README.md


+ 130 - 0
lgsm/config-default/config-lgsm/iosserver/_default.cfg

@@ -0,0 +1,130 @@
+##################################
+######## Default Settings ########
+##################################
+# DO NOT EDIT WILL BE OVERWRITTEN!
+# Copy settings from here and use them in either
+# common.cfg - applies settings to every instance
+# [instance].cfg - applies settings to a specific instance
+
+#### Server Settings ####
+
+## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
+ip="0.0.0.0"
+port="27015"
+clientport="27005"
+sourcetvport="27020"
+defaultmap="8v8_vienna"
+maxplayers="32"
+
+## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+fn_parms(){
+parms="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
+}
+
+#### LinuxGSM Settings ####
+
+## Notification Alerts
+# (on|off)
+
+# More info | https://docs.linuxgsm.com/alerts#more-info
+postalert="off"
+postdays="7"
+posttarget="https://hastebin.com"
+
+# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
+discordalert="off"
+discordwebhook="webhook"
+
+# Email Alerts | https://docs.linuxgsm.com/alerts/email
+emailalert="off"
+email="email@example.com"
+emailfrom=""
+
+# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
+iftttalert="off"
+ifttttoken="accesstoken"
+iftttevent="linuxgsm_alert"
+
+# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
+mailgunalert="off"
+mailguntoken="accesstoken"
+mailgundomain="example.com"
+mailgunemailfrom="alert@example.com"
+mailgunemail="email@myemail.com"
+
+# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
+pushoveralert="off"
+pushovertoken="accesstoken"
+
+# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
+# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
+# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
+# any custom string in curl - simple ignore this parameter.
+telegramalert="off"
+telegramtoken="accesstoken"
+telegramchatid=""
+curlcustomstring=""
+
+## Updating | https://docs.linuxgsm.com/commands/update
+updateonstart="off"
+
+## Backup | https://docs.linuxgsm.com/commands/backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://docs.linuxgsm.com/features/logging
+consolelogging="on"
+logdays="7"
+
+#### LinuxGSM Advanced Settings ####
+
+# ANSI Colors
+ansi="on"
+
+## SteamCMD Settings
+# Server appid
+appid="673990"
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta latest_experimental"
+branch=""
+
+## LinuxGSM Server Details
+# Do not edit
+gamename="IOSoccer"
+engine="source"
+
+#### Directories ####
+# Edit with care
+
+## Server Specific Directories
+systemdir="${serverfiles}/iosoccer"
+executabledir="${serverfiles}"
+executable="./srcds_run"
+servercfg="${servicename}.cfg"
+servercfgdefault="server.cfg"
+servercfgdir="${systemdir}/cfg"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${rootdir}/backups"
+
+## Logging Directories
+logdir="${rootdir}/log"
+gamelogdir="${systemdir}/logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+lgsmlog="${lgsmlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+alertlog="${lgsmlogdir}/${servicename}-alert.log"
+postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"
+
+## Logs Naming
+lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

+ 1 - 0
lgsm/data/serverlist.csv

@@ -37,6 +37,7 @@ hldm,hldmserver,Half-Life: Deathmatch
 hw,hwserver,Hurtworld
 ins,insserver,Insurgency
 inss,inssserver,Insurgency: Sandstorm
+ios,iosserver,IOSoccer
 jc2,jc2server,Just Cause 2
 jc3,jc3server,Just Cause 3
 kf,kfserver,Killing Floor

+ 1 - 1
lgsm/functions/alert_discord.sh

@@ -16,7 +16,7 @@ escaped_alertbody="$(echo -n "${alertbody}" | jq -sRr "@json")"
 json=$(cat <<EOF
 {
 	"username":"LinuxGSM",
-	"avatar_url":"https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/data/alert_discord_logo.png",
+	"avatar_url":"https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.png",
 	"file":"content",
 	"embeds": [{
 		"color": "2067276",

+ 15 - 3
lgsm/functions/check_deps.sh

@@ -10,7 +10,11 @@ fn_install_mono_repo(){
 	if [ "${monostatus}" != "0" ]; then
 		fn_print_dots "Adding Mono repository"
 		sleep 0.5
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			fn_print_info_nl "Automatically adding Mono repository."
 			fn_script_log_info "Automatically adding Mono repository."
@@ -101,7 +105,11 @@ fn_install_universe_repo(){
 		fn_print_warning_nl "Ubuntu 18.04.1 contains a bug which means the sources.list file does not populate with the Ubuntu universe repository."
 		fn_print_information_nl "Attempting to add Universe Repo"
 		sleep 0.5
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			echo -en ".\r"
 			sleep 1
@@ -228,7 +236,11 @@ fn_found_missing_deps(){
 			fn_print_warning_nl "jq is not available in the ${distroname} repository"
 			echo "	* https://docs.linuxgsm.com/requirements/jq"
 		fi
-		sudo -v > /dev/null 2>&1
+		if [ "${autoinstall}" == "1" ]; then
+			sudo -n true > /dev/null 2>&1
+		else
+			sudo -v > /dev/null 2>&1
+		fi
 		if [ $? -eq 0 ]; then
 			fn_print_information_nl "Automatically installing missing dependencies."
 			fn_script_log_info "Automatically installing missing dependencies."

+ 1 - 1
lgsm/functions/check_permissions.sh

@@ -181,7 +181,7 @@ fn_sys_perm_fix_manually_msg(){
 
 # Attempt to fix /sys related permission errors if sudo is available, exits otherwise
 fn_sys_perm_errors_fix(){
-	sudo -v > /dev/null 2>&1
+	sudo -n true > /dev/null 2>&1
 	if [ $? -eq 0 ]; then
 		fn_print_dots "Automatically fixing /sys permissions"
 		sleep 0.5

+ 0 - 11
lgsm/functions/fix_csgo.sh

@@ -32,14 +32,3 @@ if [ -f "${servercfgdir}/valve.rc" ] && grep -E '^\s*exec\s*(default|joystick)\.
 	sed -i 's/^\s*exec\s*joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
 	fn_fix_msg_end
 fi
-
-# Fixes: workshop map issue.
-# http://forums.steampowered.com/forums/showthread.php?t=3170366.
-if [ -f "${systemdir}/subscribed_collection_ids.txt" ]||[ -f "${systemdir}/subscribed_file_ids.txt" ]||[ -f "${systemdir}/ugc_collection_cache.txt" ]; then
-	fixname="workshop map"
-	fn_fix_msg_start
-	rm -f "${systemdir}/subscribed_collection_ids.txt"
-	rm -f "${systemdir}/subscribed_file_ids.txt"
-	rm -f "${systemdir}/ugc_collection_cache.txt"
-	fn_fix_msg_end
-fi

+ 5 - 3
lgsm/functions/info_distro.sh

@@ -89,8 +89,10 @@ days=$(( uptime/60/60/24 ))
 ## Average server load
 load=$(uptime|awk -F 'load average: ' '{ print $2 }')
 
-## Memory information
-
+## CPU information
+cpumodel=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
+cpucores=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)
+cpufreuency=$(awk -F: ' /cpu MHz/ {freq=$2} END {print freq " MHz"}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
 
 ## Memory information
 # Available RAM and swap.
@@ -232,4 +234,4 @@ if [ ! "$(command -v jq 2>/dev/null)" ]; then
 			fi
 		fi
 	fi
-fi
+fi

+ 1 - 1
lgsm/functions/info_glibc.sh

@@ -115,7 +115,7 @@ elif [ "${gamename}" == "Squad" ]; then
 	glibcrequired="2.17"
 	glibcfix="no"
 elif [ "${gamename}" == "Sven Co-op" ]; then
-	glibcrequired="2.18"
+	glibcrequired="2.24"
 	glibcfix="no"
 elif [ "${shortname}" == "sbots" ]; then
 	glibcrequired="2.17"

+ 6 - 0
lgsm/functions/info_messages.sh

@@ -74,6 +74,12 @@ fn_info_message_performance(){
 		echo -e "${blue}Avg Load:\t${default}${load}"
 	} | column -s $'\t' -t
 	echo -e ""
+	{
+		echo -e "${blue}CPU Model:\t${default}${cpumodel}"
+		echo -e "${blue}CPU Cores:\t${default}${cpucores}"
+		echo -e "${blue}CPU Frequency:\t${default}${cpufreuency}"
+	} | column -s $'\t' -t	
+	echo -e ""
 	{
 		echo -e "${blue}Mem:\t${blue}total\tused\tfree\tcached\tavailable${default}"
 		echo -e "${blue}Physical:\t${default}${physmemtotal}\t${physmemused}\t${physmemfree}\t${physmemcached}\t${physmemavailable}${default}"

+ 1 - 0
lgsm/functions/info_parms.sh

@@ -77,6 +77,7 @@ fn_info_parms_projectzomboid(){
 
 fn_info_parms_quakeworld(){
 	port=${port:-"0"}
+	queryport=${port}
 }
 
 fn_info_parms_quake2(){

+ 6 - 0
lgsm/functions/install_config.sh

@@ -373,6 +373,12 @@ elif [ "${gamename}" == "Insurgency" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
+elif [ "${gamename}" == "IOSoccer" ]; then
+	gamedirname="IOSoccer"
+	array_configs+=( server.cfg )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Just Cause 2" ]; then
 	gamedirname="JustCause2"
 	array_configs+=( config.lua )

+ 9 - 1
lgsm/functions/query_gamedig.sh

@@ -30,6 +30,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 			fi
 		done
 
+		local engine_query_array=( quake )
+		for engine_query in "${engine_query_array[@]}"
+		do
+			if [ "${engine_query}" == "${engine}" ]; then
+				gamedigengine="protocol-quake1"
+			fi
+		done
+
 		local engine_query_array=( idtech2 iw2.0 )
 		for engine_query in "${engine_query_array[@]}"
 		do
@@ -38,7 +46,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 			fi
 		done
 
-		local engine_query_array=( idtech3 quake iw3.0 )
+		local engine_query_array=( idtech3 iw3.0 )
 		for engine_query in "${engine_query_array[@]}"
 		do
 			if [ "${engine_query}" == "${engine}" ]; then

+ 2 - 2
lgsm/functions/query_gsquery.py

@@ -18,8 +18,8 @@ class gsquery:
         self.default_buffer_length = 1024
         #
         sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ]
-        idtech3query=['idtech3','quake','iw3.0']
-        idtech2query=['idtech2','iw2.0']
+        idtech3query=['idtech3','iw3.0']
+        idtech2query=['idtech2','quake','iw2.0']
         minecraftquery=['minecraft','lwjgl2']
         if self.option.engine in sourcequery:
             self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff