diff --git a/.github/no-response.yml b/.github/no-response.yml index 432ff0cd1..a883b161e 100644 --- a/.github/no-response.yml +++ b/.github/no-response.yml @@ -3,7 +3,7 @@ # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 60 # Label requiring a response -responseRequiredLabel: "status: waiting response" +responseRequiredLabel: "waiting response" # 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 diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 9fc886b4e..c058b6d24 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -11,17 +11,16 @@ jobs: repo-sync: runs-on: ubuntu-latest steps: - - name: ssh - uses: webfactory/ssh-agent@v0.2.0 + - name: webfactory/ssh-agent + uses: webfactory/ssh-agent@v0.4.1 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} - ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} - name: repo-sync - uses: wei/git-sync@v2 + uses: wei/git-sync@v2.1.0 with: + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} source_repo: "https://github.com/GameServerManagers/LinuxGSM" source_branch: "refs/heads/*" destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git" destination_branch: "refs/heads/*" - ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} diff --git a/README.md b/README.md index 7e8c789d3..6f6f41c6f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ LinuxGSM -[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e98be27840043a090c3ab6e35db44b0)](https://app.codacy.com/app/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade_Dashboard) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9ef77095e98a43618ddd57381f86b4be)](https://www.codacy.com/manual/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Coverage) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) +[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d19c5234dc3743d8a8a14093711ca52d)](https://www.codacy.com/gh/GameServerManagers/LinuxGSM/dashboard?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) [LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 20c560fe8..c0d82a5ab 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="302550" +steamcmdforcewindows="yes" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 2990b22d4..8e1c62fbf 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -41,8 +41,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -143,6 +141,7 @@ querytype="protocol-valve" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="985050" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 4f1ec49fa..da64ff4a0 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 405f4f2e0..f5ac04477 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -39,8 +39,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -118,6 +116,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="376030" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index fcaf08e6b..bacd851f3 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -52,8 +52,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -131,6 +129,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="233780" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index add910465..36703b30c 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="565060" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 9f259e912..2ba9bd914 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="475370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 069cff3c7..ace128b19 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 61d227104..6dea0c4c0 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="817300" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 4b3ae87d2..6a498aaaf 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index 0745ae8d8..a62b9cdcd 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 6ca39c63f..c844d94a1 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="346680" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 321760577..0095661c9 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="416880" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 8d2510768..a43270618 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -46,8 +46,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -125,6 +123,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="228780" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index f6ee27eaf..7ec7dc257 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -113,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="805140" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index b65ac7207..b1014cbdc 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1026340" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 3f730bee3..866d9b1eb 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="383410" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 575db8be6..c8e09c8da 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -38,8 +38,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -117,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="220070" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index ea66ab46e..9dfb852e5 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 385735043..b5ee4bc63 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index b92ff6bd8..377c2e6e4 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 935d4b777..0f179903a 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 38f9cef83..1430387bc 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg similarity index 85% rename from lgsm/config-default/config-lgsm/ss3server/_default.cfg rename to lgsm/config-default/config-lgsm/colserver/_default.cfg index 2bf613418..63a60b6c8 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -8,13 +8,10 @@ #### Game Server Settings #### -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters -ip="0.0.0.0" - ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt +# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 fn_parms(){ -parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" +parms="-batchmode -nographics +server.config ${servercfgfullpath}" } #### LinuxGSM Settings #### @@ -33,8 +30,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -111,7 +106,8 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid -appid="41080" +appid="748090" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -142,25 +138,25 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="no" +consoleinteract="no" ## Game Server Details # Do not edit -gamename="Serious Sam 3: BFE" -engine="seriousengine35" -glibc="2.13" +gamename="Colony Survival" +engine="unity3d" +glibc="2.15" #### Directories #### # Edit with care ## Game Server Directories -systemdir="${serverfiles}/Bin" -executabledir="${systemdir}" -executable="./runSam3_DedicatedServer.sh" -servercfgdir="${serverfiles}/Content/SeriousSam3/Config" -servercfg="${selfname}.ini" -servercfgdefault="server.ini" +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./colonyserver.x86_64" +servercfgdir="${systemdir}/gamedata/settings" +servercfg="${selfname}.json" +servercfgdefault="colserver.json" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -168,7 +164,7 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${logdir}/server" +gamelogdir="${serverfiles}/gamedata/logs/server/" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" gamelog="${gamelogdir}/${selfname}-game.log" @@ -178,6 +174,6 @@ alertlog="${lgsmlogdir}/${selfname}-alert.log" postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" ## Logs Naming +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" -gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 9b7cb3f6c..fbe8fb9f1 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="czero" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index c4a764dc3..c5a44b820 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -62,8 +62,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -141,6 +139,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="740" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -159,7 +158,7 @@ steammaster="true" # 9: GoldSrc # 10: Avorion # 11: end -stopmode="3" +stopmode="9" ## Query mode # 1: session only diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index aba384f5c..e4eb45909 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 72c18e3d2..5dd2d09a3 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232330" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index f364b4add..2ba9c66c3 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317800" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index fba4df367..e13d16998 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="dmc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index b41d31c69..768cd5916 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="dod" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index ab15451ee..edfe49b05 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232290" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 6c4019b47..040b51a77 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -38,8 +38,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -117,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="462310" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index e55a51e76..4c2373c83 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -40,8 +40,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -119,6 +117,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="343050" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index bbf07da76..9492acfda 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17585" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 1a7b20d87..b9cc4eb9b 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="739590" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 7433b5482..293df0749 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="460040" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 321065757..0d2bf1a8c 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index c2e865155..8a808f7f3 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -18,7 +18,7 @@ branch="stable" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="--start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +parms="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" } #### LinuxGSM Settings #### @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 2c6350097..5cfab32fd 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="295230" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 7e29d9408..bdd9296e0 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -18,7 +18,7 @@ maxplayers="16" tickrate="66" gamemode="sandbox" -## Workshop Parameters | https://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers +## Workshop Parameters | https://wiki.facepunch.com/gmod/Workshop_for_Dedicated_Servers # To get an API key visit - https://steamcommunity.com/dev/apikey wsapikey="" wscollectionid="" @@ -53,8 +53,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -132,6 +130,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="4020" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 5bcb4da18..aa4515806 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 844a9c64e..79daf5607 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 688c6cf85..e174f48ef 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="255470" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index cf049dab5..37b1e171c 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -48,8 +48,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -127,6 +125,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="405100" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 9408d9355..3302251e2 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -43,8 +43,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -122,6 +120,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="237410" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 9f6a13a95..c7d600980 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -19,12 +19,13 @@ defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Parameter Docs: https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide fn_parms(){ # Allows serverpassword to work with parameters - if [ "${serverpassword}" != "NOT SET" ]; then - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname="${servername}" -log" + if [ "${serverpassword}" != "" ]; then + parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?password='${serverpassword}' -Port=${port} -QueryPort=${queryport} -hostname="${servername}" -log" else - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname="${servername}" -log" + parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -log" fi } @@ -44,8 +45,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -123,6 +122,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="581330" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -172,7 +172,6 @@ executable="./InsurgencyServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="Game.ini" servercfgdefault="Game.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index 93b12b9a6..9420ed294 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="673990" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 743a4bc98..122da30dd 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="261140" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index f52a1c49d..368b815aa 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="619960" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index ecd75312e..0aa6710a6 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -32,8 +32,6 @@ displayip="" # 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" @@ -137,6 +135,7 @@ consoleinteract="yes" ## SteamCMD Settings # Server appid appid="6030" +steamcmdforcewindows="yes" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index a6dcfddd1..8fb108406 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232130" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index f0cd40b8c..972351bd2 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -41,8 +41,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -120,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="215360" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 345156f88..66112ed91 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222860" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 0beae2052..22833b5b8 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222840" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index a8417d4d5..b894ade1d 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index a699b7dd1..81e833d6e 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -14,10 +14,14 @@ javaram="1024" # -Xmx$1024M ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ parms="nogui" +executable="java -Xmx${javaram}M -jar ${jarfile}" } -## Branch, "snapshot" include snapshot and pre-release versions. | (release|snapshot) +## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings +# Branch (release|snapshot) branch="release" +# Version (latest|1.16) +mcversion="latest" #### LinuxGSM Settings #### @@ -35,8 +39,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -150,7 +152,8 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="java -Xmx${javaram}M -jar ${serverfiles}/minecraft_server.jar" +jarfile="${serverfiles}/minecraft_server.jar" +executable="${jarfile}" servercfgdir="${systemdir}" servercfg="server.properties" servercfgdefault="server.properties" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index c576410f3..1af879ac1 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="629800" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index eb8a96e49..54bdb5a06 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 2813c2e47..1a4569052 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="897590" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index d4e74ac8e..3a97169f8 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 6544fe0ad..3e798e2ee 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index f0748496c..446b9a151 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="111710" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 9ec82b933..799a919c7 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317670" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index c1a39f464..c65047fff 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -44,8 +44,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -123,6 +121,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="313900" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 21b2e2fee..58e1da031 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -48,8 +48,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -127,6 +125,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="4940" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 6bb6a0b82..d1e223469 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index b607f2aff..4301a2e72 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1204170" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index d56aa97be..1af66199d 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="gearbox" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index b4550106d..3f1f88292 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="332670" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index b5d5275f5..c3ec4ec3f 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -39,8 +39,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -118,6 +116,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="746200" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 9c1cbced2..b8b96d735 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17575" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg similarity index 84% rename from lgsm/config-default/config-lgsm/gesserver/_default.cfg rename to lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 2a1e0578e..e2373f9fd 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -10,15 +10,14 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" -port="27015" -clientport="27005" -sourcetvport="27020" -defaultmap="ge_archives" -maxplayers="16" +port="7777" + +# Maps: bridge, datacenter, sand +defaultmap="datacenter" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +parms="${defaultmap} -log -MultiHome=${ip} -Port=${port}" } #### LinuxGSM Settings #### @@ -37,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,12 +112,13 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid -appid="310" # Source 2007 SDK +appid="622970" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="true" +steammaster="false" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill @@ -134,7 +132,7 @@ steammaster="true" # 9: GoldSrc # 10: Avorion # 11: end -stopmode="3" +stopmode="2" ## Query mode # 1: session only @@ -142,29 +140,29 @@ stopmode="3" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +querytype="" ## Console type -consoleverbose="yes" -consoleinteract="yes" +consoleverbose="no" +consoleinteract="no" ## Game Server Details # Do not edit -gamename="GoldenEye: Source" -engine="source" -glibc="2.15" +gamename="Pavlov VR" +engine="unreal4" +glibc="2.17" #### Directories #### # Edit with care ## Game Server Directories -systemdir="${serverfiles}/gesource" -executabledir="${serverfiles}" -executable="./srcds_run" -servercfgdir="${systemdir}/cfg" -servercfg="${selfname}.cfg" -servercfgdefault="server.cfg" +systemdir="${serverfiles}/Pavlov" +executabledir="${systemdir}/Binaries/Linux" +executable="./PavlovServer" +servercfgdir="${systemdir}/Saved/Config/LinuxServer" +servercfg="Game.ini" +servercfgdefault="Game.ini" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory @@ -172,7 +170,7 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" -gamelogdir="${systemdir}/logs" +gamelogdir="${systemdir}/Saved/Logs" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index e90f45cbf..9995baeea 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -112,6 +110,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380870" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 618879a0f..63306512d 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 76b695f1e..8ff151fc0 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index b6b249319..ad44f6c29 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -108,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="349090" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 2f5357ed7..e4541086c 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index f8252bca7..187ca2ede 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="ricochet" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 0237e908c..96f26998a 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="223250" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 239c0d3e8..f2647542b 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index fef3de860..db48ddd55 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -14,7 +14,7 @@ port="28015" rconport="28016" appport=28082 rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for the Facepunch web panel; 0 for RCON tools like Rusty or Rustadmin. +rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. servername="Rust" maxplayers="50" seed="" # range: 1-2147483647, used to reproduce a procedural map. @@ -44,8 +44,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -123,6 +121,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="258550" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 3c6692e54..0a83c50d9 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -32,8 +32,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -111,6 +109,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="339010" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 7ebd4e7ff..4f88ee743 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 655ed4164..628b921e2 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="974130" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 76e52e36d..d6cbf5f8d 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="211820" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg new file mode 100644 index 000000000..e1753d071 --- /dev/null +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -0,0 +1,169 @@ +################################## +######## 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 +## All server settings except the server port are done in the config file: +## Docs: https://en.scpslgame.com/index.php?title=Docs:Server_Config +port="7777" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="${port}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# 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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="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" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +# Message Display Time +sleeptime="0.5" + +# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: Gold Source +# 10: Teamspeak 3 +stopmode="7" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## SteamCMD Settings +# Server appid +appid="996560" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="" + +## LinuxGSM Server Details +# Do not edit +gamename="SCP: Secret Laboratory" +engine="unity3d" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./LocalAdmin" +servercfg="config_gameplay.txt" +servercfgdefault="config_gameplay.txt" +servercfgdir="${HOME}/.config/SCP Secret Laboratory/config/${port}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg new file mode 100644 index 000000000..905918e9a --- /dev/null +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -0,0 +1,169 @@ +################################## +######## 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 +## All server settings except the server port are done in the config file: +## Docs: https://en.scpslgame.com/index.php?title=Docs:Server_Config +port="7777" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="${port}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# 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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="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" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +# Message Display Time +sleeptime="0.5" + +# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: Gold Source +# 10: Teamspeak 3 +stopmode="7" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## SteamCMD Settings +# Server appid +appid="786920" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="" + +## LinuxGSM Server Details +# Do not edit +gamename="SCP: Secret Laboratory ServerMod" +engine="unity3d" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./LocalAdmin" +servercfg="config_gameplay.txt" +servercfgdefault="config_gameplay.txt" +servercfgdir="${HOME}/.config/SCP Secret Laboratory/config/${port}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index b5799355b..d2b754e6b 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -32,8 +32,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -111,6 +109,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="294420" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/secrets-common-template.cfg b/lgsm/config-default/config-lgsm/secrets-common-template.cfg new file mode 100644 index 000000000..d8ded6aa9 --- /dev/null +++ b/lgsm/config-default/config-lgsm/secrets-common-template.cfg @@ -0,0 +1,5 @@ +################################## +######## Common Secrets ########## +################################## +# PLACE GLOBAL SECRET SETTINGS HERE +## These settings will apply to all instances. diff --git a/lgsm/config-default/config-lgsm/secrets-instance-template.cfg b/lgsm/config-default/config-lgsm/secrets-instance-template.cfg new file mode 100644 index 000000000..5446d3718 --- /dev/null +++ b/lgsm/config-default/config-lgsm/secrets-instance-template.cfg @@ -0,0 +1,5 @@ +################################## +####### Instance Secrets ######### +################################## +# PLACE INSTANCE SECRET SETTINGS HERE +## These settings will apply to a specific instance. diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 5a82abe57..5edbb791a 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index e35a1d36a..79b6ff01b 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 42be03d34..e23a90421 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -109,6 +107,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="638500" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 3b3245721..62be29db5 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -113,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="403240" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 3d51ff6eb..b0aa30fd6 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -39,8 +39,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -118,6 +116,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="600760" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 5a41d928e..7647d7566 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="276060" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 618fbf0da..6b9f66d3e 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="105600" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index d4eba581a..cc3ed416f 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232250" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index e5bb41eb0..ec8dcdcb3 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="tfc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index e08b07ab2..34cb54fb8 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index a44056db6..a0c62e430 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 7616eb80c..799be9a80 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -39,8 +39,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -118,6 +116,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="439660" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index d06162c3c..40f81d959 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380840" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index ef4cb472d..36445e51d 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -35,8 +35,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -114,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1110390" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index ebb334abc..1bf464c29 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index cb56d6e9b..e8f93eb02 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -49,8 +49,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index c1df41506..70699e1c4 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -33,8 +33,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 0f8ff562f..a21c4a1bc 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg new file mode 100644 index 000000000..e23baf8af --- /dev/null +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -0,0 +1,171 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="--datapath ${servercfgdir}" +} + +## Release Settings | https://docs.linuxgsm.com/game-servers/vintagestory#release-settings +# Branch (stable|unstable) +branch="stable" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# 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" +mailgunapiregion="us" +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" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" +rocketchattoken="" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +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" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Vintage Story" +engine="vintagestory" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +preexecutable="mono" +executable="./VintagestoryServer.exe" +servercfgdir="${serverfiles}/data/${selfname}" +servercfg="serverconfig.json" +servercfgdefault="serverconfig.json" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${vsdataworld}/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 028d51655..83ae3b82c 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -36,8 +36,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -115,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 5b5af03c5..b9ed41c69 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -29,8 +29,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 5e1297103..957124aae 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -34,8 +34,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -133,6 +131,7 @@ querytype="protocol-quake3" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1136510" +steamcmdforcewindows="no" appidmod="warfork" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 406a569a2..0a2131adf 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -31,8 +31,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -107,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="402370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index c3904303e..3eccd1daa 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -37,8 +37,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -116,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 4cfb08c61..c30c533b5 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -42,8 +42,6 @@ displayip="" # More info | https://docs.linuxgsm.com/alerts#more-info postalert="off" -postdays="7" -posttarget="https://termbin.com" # Discord Alerts | https://docs.linuxgsm.com/alerts/discord discordalert="off" @@ -121,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17505" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8a71858fe..79139f680 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -21,6 +21,7 @@ cod2,cod2server,Call of Duty 2 cod4,cod4server,Call of Duty 4 coduo,coduoserver,Call of Duty: United Offensive codwaw,codwawserver,Call of Duty: World at War +col,colserver,Colony Survival cs,csserver,Counter-Strike 1.6 cscz,csczserver,Counter-Strike: Condition Zero csgo,csgoserver,Counter-Strike: Global Offensive @@ -37,7 +38,6 @@ em,emserver,Empires Mod etl,etlserver,ET: Legacy fctr,fctrserver,Factorio fof,fofserver,Fistful of Frags -ges,gesserver,GoldenEye: Source gmod,gmodserver,Garrys Mod hl2dm,hl2dmserver,Half-Life 2: Deathmatch hldm,hldmserver,Half-Life: Deathmatch @@ -70,6 +70,7 @@ opfor,opforserver,Opposing Force pc,pcserver,Project Cars pstbs,pstbsserver,Post Scriptum: The Bloody Seventh pvkii,pvkiiserver,Pirates Vikings & Knights II +pvr,pvrserver,Pavlov VR pz,pzserver,Project Zomboid q2,q2server,Quake 2 q3,q3server,Quake 3: Arena @@ -83,12 +84,13 @@ rw,rwserver,Rising World samp,sampserver,San Andreas Multiplayer sb,sbserver,Starbound sbots,sbotsserver,StickyBots +scpsl,scpslserver,SCP: Secret Laboratory +scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod sdtd,sdtdserver,7 Days to Die sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition sol,solserver,Soldat squad,squadserver,Squad -ss3,ss3server,Serious Sam 3: BFE st,stserver,Stationeers sven,svenserver,Sven Co-op terraria,terrariaserver,Terraria @@ -104,6 +106,7 @@ ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 vs,vsserver,Vampire Slayer +vints,vintsserver,Vintage Story wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 83280c31f..0c3779e46 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -60,6 +60,15 @@ fn_alert_update(){ alertbody="${gamename} received update" } +fn_alert_check_update(){ + fn_script_log_info "Sending alert: Update available" + alertsubject="Alert - ${selfname} - Update available" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${gamename} update available" +} + fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" alertsubject="Alert - ${selfname}: Permissions error" @@ -88,6 +97,8 @@ elif [ "${alert}" == "test" ]; then fn_alert_test elif [ "${alert}" == "update" ]; then fn_alert_update +elif [ "${alert}" == "check-update" ]; then + fn_alert_check_update elif [ "${alert}" == "config" ]; then fn_alert_config fi @@ -100,6 +111,7 @@ if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then exitbypass=1 command_postdetails.sh fn_firstcommand_reset + unset exitbypass elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index c19e66506..a8ce373f0 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -21,7 +21,8 @@ json=$(cat <&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -425,9 +437,9 @@ fn_deps_build_debian(){ else array_deps_required+=( default-jre rng-tools ) fi - # GoldenEye: Source - elif [ "${shortname}" == "ges" ]; then - array_deps_required+=( zlib1g:i386 libldap-2.4-2:i386 ) + # SCP: Secret Laboratory, SCP: Secret Laboratory ServerMod + elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + array_deps_required+=( mono-complete ) # Sven Co-op elif [ "${shortname}" == "sven" ]; then array_deps_required+=( libssl1.1:i386 zlib1g:i386 ) @@ -443,12 +455,18 @@ fn_deps_build_debian(){ # Unreal Tournament elif [ "${shortname}" == "ut" ]; then array_deps_required+=( unzip ) + # Vintage Story + elif [ "${shortname}" == "vints" ]; then + array_deps_required+=( mono-complete ) # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xvfb ) # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( libgconf-2-4 ) + # Pavlov VR + elif [ "${shortname}" == "pvr" ]; then + array_deps_required+=( libc++1 ) fi fn_deps_email fn_check_loop @@ -461,15 +479,15 @@ fn_deps_build_redhat(){ # LinuxGSM requirements. # CentOS if [ "${distroversion}" == "7" ]; then - array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [ "${distroversion}" == "8" ]; then - array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [ "${distroid}" == "fedora" ]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) else - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) fi # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686. @@ -492,11 +510,14 @@ fn_deps_build_redhat(){ # 7 Days to Die elif [ "${shortname}" == "sdtd" ]; then array_deps_required+=( telnet expect ) + # Barotrauma + elif [ "${shortname}" == "bt" ]; then + array_deps_required+=( libicu ) # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) - # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source - elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then + # Battlefield 1942, Black Mesa: Deathmatch, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then @@ -504,6 +525,9 @@ fn_deps_build_redhat(){ # Call of Duty & Medal of Honor: Allied Assault elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then array_deps_required+=( compat-libstdc++-33.i686 ) + # Colony Survival + elif [ "${shortname}" == "col" ]; then + array_deps_required+=( coreutils ) # Ecoserver elif [ "${shortname}" == "eco" ]; then array_deps_required+=( libgdiplus ) @@ -514,7 +538,7 @@ fn_deps_build_redhat(){ elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( zlib-devel ) # Minecraft, Rising World, Wurm - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "wurm" ]; then + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -534,9 +558,6 @@ fn_deps_build_redhat(){ else array_deps_required+=( java-11-openjdk rng-tools ) fi - # GoldenEye: Source - elif [ "${shortname}" == "ges" ]; then - array_deps_required+=( zlib.i686 openldap.i686 ) # Sven Co-op elif [ "${shortname}" == "sven" ]; then : # not compatible @@ -552,12 +573,18 @@ fn_deps_build_redhat(){ # Unreal Tournament elif [ "${shortname}" == "ut" ]; then array_deps_required+=( unzip ) + # Vintage Story + elif [ "${shortname}" == "vints" ]; then + array_deps_required+=( mono-complete ) # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xorg-x11-server-Xvfb ) # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( GConf2 ) + # Pavlov VR + elif [ "${shortname}" == "pvr" ]; then + array_deps_required+=( libcxx ) fi fn_deps_email fn_check_loop diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index bf7ea226c..a4ddf7ae0 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -27,10 +27,10 @@ if [ -n "${ip}" ]&&[ "${ip}" != "0.0.0.0" ]; then telnetip=( "${ip}" ) # If game config does have an IP set. elif [ -n "${configip}" ]&&[ "${configip}" != "0.0.0.0" ];then - queryips=( "${configip}" ) - ip="${configip}" - webadminip=( "${configip}" ) - telnetip=( "${configip}" ) + queryips=( "${configip}" ) + ip="${configip}" + webadminip=( "${configip}" ) + telnetip=( "${configip}" ) # If there is only 1 server IP address. # Some IP details can automaticly use the one IP elif [ "${getipwc}" == "1" ]; then diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 647ee7525..9141acd0d 100755 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -6,145 +6,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_install_steamcmd(){ - if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then - steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fi - if [ ! -d "${steamcmddir}" ]; then - mkdir -p "${steamcmddir}" - fi - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nomd5" - fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" - chmod +x "${steamcmddir}/steamcmd.sh" -} - -fn_check_steamcmd_user(){ - # Checks if steamuser is setup. - if [ "${steamuser}" == "username" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" - echo -e " * Change steamuser=\"username\" to a valid steam login." - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" - fi - core_exit.sh - fi - # Anonymous user is set if steamuser is missing. - if [ -z "${steamuser}" ]; then - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_info "Using anonymous Steam login" - fi - steamuser="anonymous" - steampass='' - fi -} - -fn_check_steamcmd(){ - # Checks if SteamCMD exists when starting or updating a server. - # Only install if steamcmd package is missing or steamcmd dir is missing. - if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "SteamCMD is missing" - fn_script_log_warn "SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_dir(){ - # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. - # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 - - # Create Steam installation directory. - if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" - fi - - # Create common Steam directory. - if [ ! -d "${HOME}/.steam" ]; then - mkdir -p "${HOME}/.steam" - fi - - # Symbolic links to Steam installation directory. - if [ ! -L "${HOME}/.steam/root" ]; then - if [ -d "${HOME}/.steam/root" ]; then - rm "${HOME}/.steam/root" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" - fi - - if [ ! -L "${HOME}/.steam/steam" ]; then - if [ -d "${HOME}/.steam/steam" ]; then - rm -rf "${HOME}/.steam/steam" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" - fi -} - -fn_check_steamcmd_dir_legacy(){ - # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd - if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${rootdir:?}/steamcmd" - fi - - if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${HOME}/Steam" - fi -} - -fn_check_steamcmd_ark(){ - # Checks if SteamCMD exists in - # Engine/Binaries/ThirdParty/SteamCMD/Linux - # to allow ark mods to work - if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then - installsteamcmd=1 - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "ARK mods SteamCMD is missing" - fn_script_log_warn "ARK mods SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "ARK mods SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_clear(){ -# Will remove steamcmd dir if steamcmd package is installed. -if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then - rm -rf "${steamcmddir:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${rootdir}/steamcmd" - else - fn_script_log_pass "Removing ${rootdir}/steamcmd" - fi -fi -} - -fn_check_steamcmd_exec(){ - if [ "$(command -v steamcmd 2>/dev/null)" ]; then - steamcmdcommand="steamcmd" - else - steamcmdcommand="./steamcmd.sh" - fi -} +# init steamcmd functions +core_steamcmd.sh fn_check_steamcmd_clear fn_check_steamcmd diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 8b7db5a3c..7a8b73de5 100755 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -38,6 +38,9 @@ elif [ "${shortname}" == "ns2" ]||[ "${shortname}" == "ns2c" ]; then elif [ "${shortname}" == "st" ]; then ramrequirementmb="1000" ramrequirementgb="1" +elif [ "${shortname}" == "pvr" ];then + ramrequirementmb="2000" + ramrequirementgb="2" fi # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh new file mode 100755 index 000000000..5bda55469 --- /dev/null +++ b/lgsm/functions/command_check_update.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# LinuxGSM command_check_update.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Handles updating of servers. + +commandname="CHECK-UPDATE" +commandaction="check for Update" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_dots "" +check.sh +core_logs.sh + +core_steamcmd.sh + +check_steamcmd.sh + +fn_update_steamcmd_localbuild +fn_update_steamcmd_remotebuild +fn_update_steamcmd_compare + +core_exit.sh diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 059cf539a..fe2e8a38e 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -95,6 +95,8 @@ fn_print_ok_nl "Starting debug" # Create lockfile. date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" fn_script_log_info "Lockfile generated" fn_script_log_info "${lockdir}/${selfname}.lock" diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 2a620fd66..c8271172e 100755 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -155,6 +155,11 @@ while read -r lib; do echo -e "libfreetype6" >> "${tmpdir}/.depdetect_ubuntu_list" echo -e "libfreetype6" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 + elif [ "${lib}" == "libc++.so.1" ]; then + echo -e "libcxx" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 fi if [ "${libdetected}" != "1" ]; then diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 369f5f967..d644e0cf0 100755 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -95,6 +95,18 @@ if [ -f "${modsinstalledlistfullpath}" ]; then fi ## Installation. +# If amxmodx check if metamod exists first +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_exist "metamod" +fi + +if [ "${modcommand}" == "amxmodxcs" ] || + [ "${modcommand}" == "amxmodxdod" ] || + [ "${modcommand}" == "amxmodxtfc" ] || + [ "${modcommand}" == "amxmodxns" ] || + [ "${modcommand}" == "amxmodxts" ]; then + fn_mod_exist "amxmodx" +fi fn_create_mods_dir fn_mods_clear_tmp_dir @@ -106,6 +118,17 @@ fn_mod_copy_destination fn_mod_add_list fn_mod_tidy_files_list fn_mods_clear_tmp_dir + +# Create/modify existing liblist.gam file for Metamod +if [ "${modcommand}" == "metamod" ]; then + fn_mod_install_liblist_gam_file +fi + +# Create/modify plugins.ini file for Metamod +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_install_amxmodx_file +fi + echo -e "${modprettyname} installed" fn_script_log_pass "${modprettyname} installed." diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 7cbba8a71..507251e87 100755 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -37,7 +37,7 @@ while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do read -r usermodselect # Exit if user says exit or abort. if [ "${usermodselect}" == "exit" ]||[ "${usermodselect}" == "abort" ]; then - core_exit.sh + core_exit.sh # Supplementary output upon invalid user input. elif [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; then fn_print_error2_nl "${usermodselect} is not a valid addon/mod." @@ -82,17 +82,25 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." ((modfileline++)) done -if [ "${exitcode}" != 0 ]; then - fn_print_fail_eol_nl - core_exit.sh + +# Added logic not to fail since removing game specific mods (amxmodxcs) removes files that will +# not be found when removing the base (amxmodx) mod +if [ "${modcommand}" != "amxmodx" ]; then + if [ "${exitcode}" != 0 ]; then + fn_print_fail_eol_nl + core_exit.sh + else + fn_print_ok_eol_nl + fi else fn_print_ok_eol_nl fi + # Remove file list. echo -en "removing ${modcommand}-files.txt..." fn_sleep_time rm -rf "${modsdir:?}/${modcommand}-files.txt" -local exitcode=$? +exitcode=$? if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" fn_print_fail_eol_nl @@ -107,7 +115,7 @@ echo -en "removing ${modcommand} from ${modsinstalledlist}..." fn_sleep_time sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" -local exitcode=$? +exitcode=$? if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" fn_print_fail_eol_nl @@ -127,6 +135,17 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then fn_firstcommand_reset unset exitbypass fi + +# Remove/modify existing liblist.gam file for Metamod +if [ "${modcommand}" == "metamod" ]; then + fn_mod_remove_liblist_gam_file +fi + +# Remove/modify plugins.ini file for AMX Mod X +if [ "${modcommand}" == "amxmodx" ]; then + fn_mod_remove_amxmodx_file +fi + echo -e "${modprettyname} removed" fn_script_log "${modprettyname} removed" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 80d3f43f0..edc101012 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -25,8 +25,10 @@ fn_monitor_check_lockfile(){ fi # Fix if lockfile is not unix time or contains letters - if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(cat "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then - date '+%s' > "${lockdir}/${selfname}.lock" + if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then + date '+%s' > "${lockdir}/${selfname}.lock" + echo "${version}" >> "${lockdir}/${selfname}.lock" + echo "${port}" >> "${lockdir}/${selfname}.lock" fi } @@ -106,12 +108,12 @@ for queryattempt in {1..5}; do fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING" # querydelay - if [ "$(cat "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol_nl fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_script_log_info "Server started: $(date -d @$(cat "${lockdir}/${selfname}.lock"))" + fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))" fn_script_log_info "Current time: $(date)" monitorpass=1 core_exit.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 683a28ed4..0f18b12a9 100755 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -10,25 +10,7 @@ commandaction="Posting details" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -# Set posttarget to the appropriately-defined post destination. - -# The options for posttarget are: -# The default destination - hastebin -# posttarget="https://hastebin.com" -# -# Secondary destination - pastebin -# posttarget="http://pastebin.com -# -# Third option - leave on the filesystem -# posttarget= -# -# All of these options can be specified/overridden from the top-level -# invocation, as in: -# rustserver@gamerig:~$ posttarget="http://pastebin.com" ./rustserver pd -# to post to pastebin, or -# rustserver@gamerig:~$ posttarget= ./rustserver pd -# to leave the output on the filesystem. -posttarget=${posttarget="https://termbin.com"} +posttarget="https://termbin.com" # source all of the functions defined in the details command. info_messages.sh @@ -78,50 +60,21 @@ else fn_info_message_statusbottom } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1 fi -# Pastebin -if [ "${posttarget}" == "http://pastebin.com" ] ; then - fn_print_dots "pastbin.com for 30D" - # grab the return from 'value' from an initial visit to pastebin. - csrftoken=$(curl -s "${posttarget}" | sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p') - # - # Use the csrftoken to then post the content. - # - link=$(curl -s "${posttarget}/post.php" -D - -F "submit_hidden=submit_hidden" \ - -F "post_key=${csrftoken}" -F "paste_expire_date=30D" \ - -F "paste_name=${gamename} Debug Info" \ - -F "paste_format=8" -F "paste_private=0" \ - -F "paste_type=bash" -F "paste_code=<${postdetailslog}" | - awk '/^location: / { print $2 }' | sed "s/\n//g") - # Output the resulting link. - fn_print_ok_nl "pastbin.com for 30D" - fn_script_log_pass "pastbin.com for 30D" - pdurl="${posttarget}${link}" -# Hastebin -elif [ "${posttarget}" == "https://hastebin.com" ] ; then - fn_print_dots "hastebin.com" - # hastebin is a bit simpler. If successful, the returned result - # should look like: {"something":"key"}, putting the reference that - # we need in "key". TODO - error handling. -CedarLUG - link=$(curl -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${postdetailslog})" "${posttarget}/documents" | cut -d\" -f4) - fn_print_ok_nl "hastebin.com for 30D" - fn_script_log_pass "hastebin.com for 30D" - pdurl="${posttarget}/${link}" -# Termbin -elif [ "${posttarget}" == "https://termbin.com" ] ; then - fn_print_dots "termbin.com" - link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') - fn_print_ok_nl "termbin.com for 30D" - fn_script_log_pass "termbin.com for 30D" - pdurl="${link}" +fn_print_dots "termbin.com" +link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') +fn_print_ok_nl "termbin.com for 30D" +fn_script_log_pass "termbin.com for 30D" +pdurl="${link}" + +if [ "${firstcommandname}" == "POST-DETAILS" ]; then + echo -e "" + echo -e "Please share the following url for support: " + echo -e "${pdurl}" fi -echo -e "" -echo -e "Please share the following url for support: " -echo -e "${pdurl}" fn_script_log_info "${pdurl}" +alerturl="${pdurl}" if [ -z "${exitbypass}" ]; then core_exit.sh -else - alerturl="${pdurl}" fi diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/functions/command_skeleton.sh new file mode 100644 index 000000000..cb1136915 --- /dev/null +++ b/lgsm/functions/command_skeleton.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# LinuxGSM command_skeleton.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Creates an copy of a game servers directorys. + + +fn_print_dots "Creating skeleton directory" +check.sh + +# Find all directorys and create them in the skel directory +find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2>/dev/null +exitcode=$? +if [ "${exitcode}" != 0 ]; then + fn_print_fail_nl "Creating skeleton directory" + fn_script_log_fatal "Creating skeleton directory" +else + fn_print_ok_nl "Creating skeleton directory: ./skel" + fn_script_log_pass "Creating skeleton directory: ./skel" +fi +core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 62160e187..897cc90aa 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -71,6 +71,8 @@ fn_start_tmux(){ # Create lockfile date '+%s' > "${lockdir}/${selfname}.lock" + echo "${version}" >> "${lockdir}/${selfname}.lock" + echo "${port}" >> "${lockdir}/${selfname}.lock" cd "${executabledir}" || exit tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 439967fd0..6fe06e4ef 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -43,7 +43,7 @@ fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${sessionname}" "${1}" ENTER > /dev/null 2>&1 + tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index d4804edef..718f5d490 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -27,7 +27,9 @@ elif [ "${shortname}" == "fctr" ]; then elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "jk2" ]; then - update_jediknight2.sh + update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh else update_steamcmd.sh fi diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh deleted file mode 100755 index e69de29bb..000000000 diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 37918be2d..7e0ec57b6 100755 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -17,9 +17,9 @@ fn_script_log_info "Updating LinuxGSM" fn_print_dots "Selecting repo" fn_script_log_info "Selecting repo" # Select remotereponame -curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null +curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null if [ $? != "0" ]; then - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null if [ $? != "0" ]; then fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" @@ -36,9 +36,9 @@ fi # Check linuxsm.sh echo -en "checking ${remotereponame} linuxgsm.sh...\c" if [ "${remotereponame}" == "GitHub" ]; then - curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null else - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null fi if [ $? != "0" ]; then fn_print_fail_eol_nl @@ -48,9 +48,9 @@ if [ $? != "0" ]; then fi if [ "${remotereponame}" == "GitHub" ]; then - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) else - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) fi if [ "${tmp_script_diff}" != "" ]; then @@ -116,9 +116,9 @@ fi echo -en "checking ${remotereponame} config _default.cfg...\c" fn_script_log_info "Checking ${remotereponame} config _default.cfg" if [ "${remotereponame}" == "GitHub" ]; then - curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null else - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null fi if [ $? != "0" ]; then fn_print_fail_eol_nl @@ -128,9 +128,9 @@ if [ $? != "0" ]; then fi if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) else - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) fi if [ "${config_file_diff}" != "" ]; then @@ -155,9 +155,9 @@ if [ -n "${functionsdir}" ]; then echo -en "checking ${remotereponame} module ${functionfile}...\c" github_file_url_dir="lgsm/functions" if [ "${remotereponame}" == "GitHub" ]; then - curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null else - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null fi if [ $? != 0 ]; then fn_print_error_eol_nl @@ -174,9 +174,9 @@ if [ -n "${functionsdir}" ]; then else # compare file if [ "${remotereponame}" == "GitHub" ]; then - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) else - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) fi # results diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 7ebf2aa9d..f48f9e5f8 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -38,19 +38,6 @@ fn_wipe_server_files(){ fn_sleep_time fn_script_log_pass "No procedural map file to remove" fi - # Wipe procedural map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then - echo -en "removing map saves proceduralmap.*.sav file(s)..." - fn_sleep_time - fn_script_log_info "Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav" - find "${serveridentitydir:?}" -type f -name "proceduralmap.*.sav" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no procedural map save to remove" - fn_sleep_time - fn_script_log_pass "No procedural map save to remove" - fi # Wipe Barren map. if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then echo -en "removing barren map barren*.map file(s)..." @@ -64,19 +51,6 @@ fn_wipe_server_files(){ fn_sleep_time fn_script_log_pass "No barren map file to remove" fi - # Wipe barren map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then - echo -en "removing barren map saves barren*.sav file(s)..." - fn_sleep_time - fn_script_log_info "Removing barren map save(s): ${serveridentitydir}/barren*.sav" - find "${serveridentitydir:?}" -type f -name "barren*.sav" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no barren map save to remove" - fn_sleep_time - fn_script_log_pass "No barren map save to remove." - fi # Wipe custom map. if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then echo -en "removing custom map file(s)..." @@ -91,11 +65,11 @@ fn_wipe_server_files(){ fn_script_log_pass "No map file to remove" fi # Wipe custom map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav")" ]; then - echo -en "removing map save *.sav file(s)..." + if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then + echo -en "removing map save *.sav* file(s)..." fn_sleep_time - fn_script_log_info "Removing map save(s): ${serveridentitydir}/*.sav" - find "${serveridentitydir:?}" -type f -name "*.sav" -delete | tee -a "${lgsmlog}" + fn_script_log_info "Removing map save(s): ${serveridentitydir}/*.sav*" + find "${serveridentitydir:?}" -type f -name "*.sav*" -delete | tee -a "${lgsmlog}" fn_wipe_exit_code fn_sleep_time else @@ -146,6 +120,19 @@ fn_wipe_server_files(){ fn_sleep_time fn_script_log_pass "No player death to remove" fi + # Wipe player states files + if [ -n "$(find "${serveridentitydir}" -type f -name "player.states.*.db")" ]; then + echo -en "removing player states player.states.*.db file(s)..." + fn_sleep_time + fn_script_log_info "Removing player states: ${serveridentitydir}/player.states.*.db" + find "${serveridentitydir:?}" -type f -name "player.states.*.db" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no player states to remove" + fn_sleep_time + fn_script_log_pass "No player states to remove" + fi # Wipe blueprints only if full-wipe command was used. if [ "${fullwipe}" == "1" ]; then if [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then @@ -215,7 +202,7 @@ fn_print_dots "" check.sh # Check if there is something to wipe. -if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then +if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then fn_wipe_warning check_status.sh if [ "${status}" != "0" ]; then diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index b8e1b2b86..eaaddf5c7 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -67,7 +67,7 @@ fn_dl_steamcmd(){ ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # Force Windows Platform type. - elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; then + elif [ "${steamcmdforcewindows}" == "yes" ]; then if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then @@ -87,8 +87,9 @@ fn_dl_steamcmd(){ fi # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. + # Check also if we have more errors than retries to be sure that we do not loop to many times and error out. exitcode=$? - if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then + if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" @@ -267,11 +268,11 @@ fn_fetch_file(){ echo -en "downloading ${local_filename}..." fn_sleep_time echo -en "\033[1K" - curlcmd=$(curl --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") + curlcmd=$(curl --connect-timeout 10 --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") echo -en "downloading ${local_filename}..." else echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) fi local exitcode=$? @@ -349,11 +350,12 @@ fn_fetch_file(){ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" + # For legacy versions - code can be removed at a future date if [ "${legacymode}" == "1" ]; then - # For legacy versions - code can be removed at a future date remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - elif [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + elif [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -376,7 +378,8 @@ fn_fetch_file_github(){ fn_fetch_config(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -399,7 +402,8 @@ fn_fetch_config(){ fn_fetch_function(){ github_file_url_dir="lgsm/functions" github_file_url_name="${functionfile}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -422,7 +426,8 @@ fn_fetch_function(){ fn_update_function(){ github_file_url_dir="lgsm/functions" github_file_url_name="${functionfile}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 76f868531..438a2eec3 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.4.1" +modulesversion="v20.6.2" # Core @@ -53,6 +53,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +core_steamcmd.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + # Commands command_backup.sh(){ @@ -155,6 +160,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +command_skeleton.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + command_wipe.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -330,11 +340,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_cs.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - fix_csgo.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -345,11 +350,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_ges.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - fix_hw.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -390,11 +390,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_pz.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - fix_ro.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -435,17 +430,17 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_tu.sh(){ +fix_ut3.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_ut3.sh(){ +fix_rust.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_rust.sh(){ +fix_samp.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } @@ -465,11 +460,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_ss3.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - fix_ts3.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -619,6 +609,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +command_check_update.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + update_ts3.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -659,6 +654,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +update_vintagestory.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fn_update_functions.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 82eb77691..5fae3fb9f 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -20,12 +20,14 @@ cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the serve cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." ) cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." ) cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." ) +cmd_skeleton=( "sk;skeleton" "command_skeleton.sh" "Create a skeleton directory." ) cmd_donate=( "do;donate" "command_donate.sh" "Donation options." ) # Console servers only. cmd_console=( "c;console" "command_console.sh" "Access server console." ) cmd_debug=( "d;debug" "command_debug.sh" "Start server directly in your terminal." ) # Update servers only. cmd_update=( "u;update" "command_update.sh" "Check and apply any server updates." ) +cmd_check_update=( "cu;check-update" "command_check_update.sh" "Check if a gameserver update is available" ) cmd_force_update=( "fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check." ) # SteamCMD servers only. cmd_validate=( "v;validate" "command_validate.sh" "Validate server files with SteamCMD." ) @@ -55,9 +57,9 @@ cmd_dev_clear_functions=( "cf;clear-functions" "command_dev_clear_functions.sh" ### Set specific opt here. -currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" ) +currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}" ) -# Update LGSM. +# Update LinuxGSM. currentopt+=( "${cmd_update_linuxgsm[@]}" ) # Exclude noupdate games here. @@ -71,9 +73,9 @@ if [ "${shortname}" == "jk2" ]||[ "${engine}" != "idtech3" ];then fi fi -# Validate command. +# Validate and check-update command. if [ "${appid}" ]; then - currentopt+=( "${cmd_validate[@]}" ) + currentopt+=( "${cmd_validate[@]}" "${cmd_check_update[@]}" ) fi # Backup. @@ -125,7 +127,7 @@ if [ "${shortname}" == "squad" ]; then fi ## Mods commands. -if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]; then +if [ "${engine}" == "source" ]||[ "${shortname}" == "rust" ]||[ "${shortname}" == "hq" ]||[ "${shortname}" == "sdtd" ]||[ "${shortname}" == "cs" ]||[ "${shortname}" == "dod" ]||[ "${shortname}" == "tfc" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "hldm" ]; then currentopt+=( "${cmd_mods_install[@]}" "${cmd_mods_remove[@]}" "${cmd_mods_update[@]}" ) fi diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh new file mode 100755 index 000000000..389880241 --- /dev/null +++ b/lgsm/functions/core_steamcmd.sh @@ -0,0 +1,322 @@ +#!/bin/bash +# LinuxGSM core_steamcmd.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Core functions for SteamCMD + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_steamcmd(){ + if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then + steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fi + if [ ! -d "${steamcmddir}" ]; then + mkdir -p "${steamcmddir}" + fi + fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nomd5" + fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" + chmod +x "${steamcmddir}/steamcmd.sh" +} + +fn_check_steamcmd_user(){ + # Checks if steamuser is setup. + if [ "${steamuser}" == "username" ]; then + fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" + echo -e " * Change steamuser=\"username\" to a valid steam login." + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" + fi + core_exit.sh + fi + # Anonymous user is set if steamuser is missing. + if [ -z "${steamuser}" ]; then + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_info "Using anonymous Steam login" + fi + steamuser="anonymous" + steampass='' + fi +} + +fn_check_steamcmd(){ + # Checks if SteamCMD exists when starting or updating a server. + # Only install if steamcmd package is missing or steamcmd dir is missing. + if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "SteamCMD is missing" + fn_script_log_warn "SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_dir(){ + # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. + # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 + + # Create Steam installation directory. + if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" + fi + + # Create common Steam directory. + if [ ! -d "${HOME}/.steam" ]; then + mkdir -p "${HOME}/.steam" + fi + + # Symbolic links to Steam installation directory. + if [ ! -L "${HOME}/.steam/root" ]; then + if [ -d "${HOME}/.steam/root" ]; then + rm "${HOME}/.steam/root" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" + fi + + if [ ! -L "${HOME}/.steam/steam" ]; then + if [ -d "${HOME}/.steam/steam" ]; then + rm -rf "${HOME}/.steam/steam" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" + fi +} + +fn_check_steamcmd_dir_legacy(){ + # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd + if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${rootdir:?}/steamcmd" + fi + + if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${HOME}/Steam" + fi +} + +fn_check_steamcmd_ark(){ + # Checks if SteamCMD exists in + # Engine/Binaries/ThirdParty/SteamCMD/Linux + # to allow ark mods to work + if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then + installsteamcmd=1 + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "ARK mods SteamCMD is missing" + fn_script_log_warn "ARK mods SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "ARK mods SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_clear(){ + # Will remove steamcmd dir if steamcmd package is installed. + if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then + rm -rf "${steamcmddir:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${rootdir}/steamcmd" + else + fn_script_log_pass "Removing ${rootdir}/steamcmd" + fi + fi +} + +fn_check_steamcmd_exec(){ + if [ "$(command -v steamcmd 2>/dev/null)" ]; then + steamcmdcommand="steamcmd" + else + steamcmdcommand="./steamcmd.sh" + fi +} + +fn_update_steamcmd_localbuild(){ + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + fn_appmanifest_check + # Uses appmanifest to find local build. + localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) + + # Set branch to public if no custom branch. + if [ -z "${branch}" ]; then + branch="public" + fi + + # Checks if localbuild variable has been set. + if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then + fn_print_fail "Checking local build: ${remotelocation}" + fn_script_log_fatal "Checking local build" + core_exit.sh + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_steamcmd_remotebuild(){ + # Gets remote build info. + if [ -d "${steamcmddir}" ]; then + cd "${steamcmddir}" || exit + fi + + # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + fi + + # password for branch not needed to check the buildid + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_steamcmd_compare(){ + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuild}" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fn_script_log_info "${localbuild} > ${remotebuild}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_dl_steamcmd + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_dl_steamcmd + exitbypass=1 + command_start.sh + fn_firstcommand_reset + unset exitbypass + fi + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fi +} + +fn_appmanifest_info(){ + appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) +} + +fn_appmanifest_check(){ + fn_appmanifest_info + # Multiple or no matching appmanifest files may sometimes be present. + # This error is corrected if required. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_error "Multiple appmanifest_${appid}.acf files found" + fn_script_log_error "Multiple appmanifest_${appid}.acf files found" + fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" + for appfile in ${appmanifestfile}; do + rm -f "${appfile:?}" + done + appmanifestfilewc1="${appmanifestfilewc}" + fn_appmanifest_info + # if error can not be resolved. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + echo -e "* Check user permissions" + for appfile in ${appmanifestfile}; do + echo -e " ${appfile}" + done + core_exit.sh + else + fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fi + elif [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_error_nl "No appmanifest_${appid}.acf found" + fn_script_log_error "No appmanifest_${appid}.acf found" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fn_appmanifest_info + if [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_fail_nl "Still no appmanifest_${appid}.acf found" + fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + core_exit.sh + fi + fi +} diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index eac243075..2e2931e41 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -42,16 +42,12 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_ark.sh elif [ "${shortname}" == "bo" ]; then fix_bo.sh - elif [ "${shortname}" == "cs" ]; then - fix_cs.sh elif [ "${shortname}" == "csgo" ]; then fix_csgo.sh elif [ "${shortname}" == "cmw" ]; then fix_cmw.sh elif [ "${shortname}" == "dst" ]; then fix_dst.sh - elif [ "${shortname}" == "ges" ]; then - fix_ges.sh elif [ "${shortname}" == "hw" ]; then fix_hw.sh elif [ "${shortname}" == "ins" ]; then @@ -60,8 +56,6 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_nmrih.sh elif [ "${shortname}" == "onset" ]; then fix_onset.sh - elif [ "${shortname}" == "pz" ]; then - fix_pz.sh elif [ "${shortname}" == "rust" ]; then fix_rust.sh elif [ "${shortname}" == "rw" ]; then @@ -74,8 +68,6 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_sof2.sh elif [ "${shortname}" == "squad" ]; then fix_squad.sh - elif [ "${shortname}" == "ss3" ]; then - fix_ss3.sh elif [ "${shortname}" == "st" ]; then fix_st.sh elif [ "${shortname}" == "tf2" ]; then @@ -84,8 +76,6 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_terraria.sh elif [ "${shortname}" == "ts3" ]; then fix_ts3.sh - elif [ "${shortname}" == "tu" ]; then - fix_tu.sh elif [ "${shortname}" == "mcb" ]; then fix_mcb.sh elif [ "${shortname}" == "mta" ]; then @@ -101,7 +91,7 @@ fi # Fixes that are run on install only. if [ "${commandname}" == "INSTALL" ]; then - if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then + if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" echo -e "Applying Post-Install Fixes" echo -e "=================================" @@ -115,6 +105,8 @@ if [ "${commandname}" == "INSTALL" ]; then fix_kf2.sh elif [ "${shortname}" == "ro" ]; then fix_ro.sh + elif [ "${shortname}" == "samp" ]; then + fix_samp.sh elif [ "${shortname}" == "ut2k4" ]; then fix_ut2k4.sh elif [ "${shortname}" == "ut" ]; then diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh index 23c9179a2..545504f63 100644 --- a/lgsm/functions/fix_bo.sh +++ b/lgsm/functions/fix_bo.sh @@ -7,29 +7,3 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64" - -# steamclient.so x86 fix for unity3d game server -if [ ! -f "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${serverfiles}/BODS_Data/Plugins/x86" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" - fi - fn_fix_msg_end -fi - -# steamclient.so x86_64 fix for unity3d game server -if [ ! -f "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - mkdir -p "${serverfiles}/BODS_Data/Plugins/x86_64" - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" - fi - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh index df80e1ee9..2f517b1b7 100755 --- a/lgsm/functions/fix_cmw.sh +++ b/lgsm/functions/fix_cmw.sh @@ -4,27 +4,13 @@ # Website: https://linuxgsm.com # Description: Resolves the issue of the not starting server on linux -fixname="steam_appid.txt" - if [ ! -f "${executabledir}/steam_appid.txt" ]; then + fixname="steam_appid.txt" fn_fix_msg_start echo 219640 > "${executabledir}/steam_appid.txt" fn_fix_msg_end fi -# steamclient.so x86 fix. -if [ ! -f "${executabledir}/lib/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${executabledir}/lib" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${executabledir}/lib/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${executabledir}/lib/steamclient.so" - fi - fn_fix_msg_end -fi - if [ ! -f "${servercfgfullpath}" ]; then fn_fix_msg_start fixname="copy config" diff --git a/lgsm/functions/fix_cs.sh b/lgsm/functions/fix_cs.sh deleted file mode 100644 index ea18702b3..000000000 --- a/lgsm/functions/fix_cs.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_cs.sh function -# Author: Christian Birk -# Website: https://linuxgsm.com -# Description: Resolves various issues with Counter Strike. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# steamclient.so x86 fix. -if [ ! -f "${serverfiles}/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${serverfiles}" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/steamclient.so" - fi - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_ges.sh b/lgsm/functions/fix_ges.sh deleted file mode 100755 index 6065f9ba8..000000000 --- a/lgsm/functions/fix_ges.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ges.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Resolves various issues with GoldenEye: Source. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: MALLOC_CHECK_ needing to be set to 0. -export MALLOC_CHECK_=0 diff --git a/lgsm/functions/fix_pz.sh b/lgsm/functions/fix_pz.sh deleted file mode 100644 index 0215a390f..000000000 --- a/lgsm/functions/fix_pz.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_pz.sh function -# Author: Christian Birk -# Website: https://linuxgsm.com -# Description: Resolves various issues with Project Zomboid. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# steamclient.so x86 fix. -if [ ! -f "${serverfiles}/linux32/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${serverfiles}/linux32" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/linux32/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/linux32/steamclient.so" - fi - fn_fix_msg_end -fi - -# steamclient.so x86_64 fix. -if [ ! -f "${serverfiles}/linux64/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - mkdir -p "${serverfiles}/linux64" - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/linux64/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/linux64/steamclient.so" - fi - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_samp.sh b/lgsm/functions/fix_samp.sh new file mode 100644 index 000000000..b69779019 --- /dev/null +++ b/lgsm/functions/fix_samp.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LinuxGSM fix_sfc.sh function +# Author: Christian Birk +# Website: https://linuxgsm.com +# Description: Resolves issue that the default rcon password is not changed + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ -f "${servercfgfullpath}" ]; then + # check if default password is set "changeme" + currentpass=$(grep -E "^rcon_password" "${servercfgfullpath}" | sed 's/^rcon_password //' ) + defaultpass="changeme" + # check if default password is set + if [ "${currentpass}" == "${defaultpass}" ]; then + fixname="change default rcon password" + fn_fix_msg_start + fn_script_log_info "changing rcon/admin password." + random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) + rconpass="admin${random}" + sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}" + fn_fix_msg_end + fi + # check if the hostname is the default name + currenthostname=$(grep -E "^hostname" "${servercfgfullpath}" | sed 's/^hostname //') + defaulthostname="SA-MP 0.3 Server" + if [ "${currenthostname}" == "${defaulthostname}" ]; then + fixname="change default hostname" + fn_fix_msg_start + fn_script_log_info "changing default hostname to LinuxGSM" + sed -i "s/hostname ${defaulthostname}/hostname LinuxGSM/g" "${servercfgfullpath}" + fn_fix_msg_end + fi +fi diff --git a/lgsm/functions/fix_squad.sh b/lgsm/functions/fix_squad.sh index 199070af0..8ec84a86f 100644 --- a/lgsm/functions/fix_squad.sh +++ b/lgsm/functions/fix_squad.sh @@ -6,9 +6,9 @@ # As the server base dir changed for the game, we need to migrate the default config from the old to the new location oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" -if [ -f "${oldservercfg}" ] && [ -f "${servercfgfullpath}" ]; then +if [ -f "${oldservercfg}" ]&&[ -f "${servercfgfullpath}" ]; then # diff old and new config - if it is different move the old config over the new one - if [ $(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l) -gt 0 ]; then + if [ "$(diff -c "${oldservercfg}" "${servercfgfullpath}" | wc -l)" -gt 0 ]; then fixname="Migrate server config to new Game folder" fn_fix_msg_start mv -v "${oldservercfg}" "${servercfgfullpath}" diff --git a/lgsm/functions/fix_ss3.sh b/lgsm/functions/fix_ss3.sh deleted file mode 100755 index 76de64471..000000000 --- a/lgsm/functions/fix_ss3.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_ss3.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Resolves various issues with Serious Sam 3. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# Fixes: https://steamcommunity.com/app/41070/discussions/0/353916981477716386/ -if [ ! -f "${serverfiles}/Bin/steamclient.so" ]||[ "$(diff "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" 2>/dev/null)" ]; then - fixname="steamclient.so" - fn_fix_msg_start - mkdir -p "${serverfiles}/Bin" - cp -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" - fn_fix_msg_end -fi - -# Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory -if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then - fixname="libsteam.so" - fn_fix_msg_start - mkdir -p "${HOME}/.steam/bin32" - cp "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 6080c2065..01465b45e 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -6,6 +6,45 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# function to simplify the steamclient.so fix +# example +# fn_fix_steamclient_so 32|64 (bit) "${serverfiles}/linux32/" +fn_fix_steamclient_so(){ + # $1 type of fix 32 or 64 as possible values + # $2 as destination where the lib will be copied to + if [ "$1" == "32" ]; then + # steamclient.so x86 fix. + if [ ! -f "${2}/steamclient.so" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ ! -d "${2}" ]; then + mkdir -p "${2}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${2}/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${2}/steamclient.so" + fi + fn_fix_msg_end + fi + elif [ "$1" == "64" ]; then + # steamclient.so x86_64 fix. + if [ ! -f "${2}/steamclient.so" ]; then + fixname="steamclient.so x86_64" + fn_fix_msg_start + if [ ! -d "${2}" ]; then + mkdir -p "${2}" + fi + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${2}/steamclient.so" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + cp "${steamcmddir}/linux64/steamclient.so" "${2}/steamclient.so" + fi + fn_fix_msg_end + fi + fi +} + # Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. if [ ! -f "${HOME}/.steam/sdk64/steamclient.so" ]; then fixname="steamclient.so sdk64" @@ -31,3 +70,30 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fi fn_fix_msg_end fi + +# steamclient.so fixes +if [ "${shortname}" == "bo" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/BODS_Data/Plugins/x86" + fn_fix_steamclient_so "64" "${serverfiles}/BODS_Data/Plugins/x86_64" +elif [ "${shortname}" == "cmw" ]; then + fn_fix_steamclient_so "32" "${executabledir}/lib" +elif [ "${shortname}" == "cs" ]; then + fn_fix_steamclient_so "32" "${serverfiles}" +elif [ "${shortname}" == "col" ]; then + fn_fix_steamclient_so "64" "${serverfiles}" +elif [ "${shortname}" == "ins" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/bin" +elif [ "${shortname}" == "pz" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/linux32" + fn_fix_steamclient_so "64" "${serverfiles}/linux64" +elif [ "${shortname}" == "pvr" ]; then + fn_fix_steamclient_so "64" "${executabledir}" +elif [ "${shortname}" == "ss3" ]; then + fn_fix_steamclient_so "32" "${serverfiles}/Bin" +elif [ "${shortname}" == "tu" ];then + fn_fix_steamclient_so "64" "${executabledir}" +elif [ "${shortname}" == "unt" ]; then + fn_fix_steamclient_so "64" "${serverfiles}" +elif [ "${shortname}" == "wurm" ]; then + fn_fix_steamclient_so "64" "${serverfiles}/nativelibs" +fi diff --git a/lgsm/functions/fix_tu.sh b/lgsm/functions/fix_tu.sh deleted file mode 100755 index 96fec4b52..000000000 --- a/lgsm/functions/fix_tu.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# LinuxGSM fix_tu.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Resolves various issues with Tower Unite. - -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -# steamclient.so x86_64 fix. -if [ ! -f "${executabledir}/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - mkdir -p "${executabledir}" - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${executabledir}/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${executabledir}/steamclient.so" - fi - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index a46cbf847..d030ef318 100755 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -7,16 +7,3 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64" - -# steamclient.so x86_64 fix. -if [ ! -f "${serverfiles}/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - mkdir -p "${serverfiles}" - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/steamclient.so" - fi - fn_fix_msg_end -fi diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index d43373cfe..bf53e35b0 100755 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -6,18 +6,6 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ ! -f "${serverfiles}/nativelibs" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${serverfiles}/nativelibs" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/nativelibs/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/nativelibs/steamclient.so" - fi - fn_fix_msg_end -fi - # First run requires start with no parms. # After first run new dirs are created. if [ ! -d "${serverfiles}/Creative" ]; then diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index c38e3e155..ef782fa70 100755 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -188,7 +188,7 @@ fn_info_config_bf1942(){ queryport="${zero}" else - servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) + servername=$(grep -E "^game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') @@ -405,30 +405,6 @@ fn_info_config_factorio(){ fi } -fn_info_config_inss(){ - if [ ! -f "${servercfgfullpath}" ]; then - rconenabled="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" - rconport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - rconenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "ListenPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not Set - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"0"} - fi -} - fn_info_config_minecraft(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -827,29 +803,6 @@ fn_info_config_rtcw(){ fi } -fn_info_config_seriousengine35(){ - if [ ! -f "${servercfgfullpath}" ]; then - servername="${unavailable}" - rconpassword="${unavailable}" - gamemode="${unavailable}" - maxplayers="${zero}" - port="${zero}" - else - servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/prj_strMultiplayerSessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "rcts_strAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcts_strAdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/gam_idGameMode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - maxplayers=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - port=$(grep "prj_uwPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - - # Not Set - servername=${servername:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - gamemode=${gamemode:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - port=${port:-"0"} - fi -} - #StickyBots fn_info_config_sbots(){ if [ ! -f "${servercfgfullpath}" ]; then @@ -1248,7 +1201,7 @@ fn_info_config_sdtd(){ else servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") - port=$(grep "ServerPort" "${servercfgfullpath}" | egrep -o 'value="[0-9]+"' | tr -cd '[:digit:]') + port=$(grep "ServerPort" "${servercfgfullpath}" | grep -Eo 'value="[0-9]+"' | tr -cd '[:digit:]') queryport=${port:-"0"} webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") @@ -1534,162 +1487,188 @@ fn_info_config_soldat(){ fi } -# Assetto Corsa +fn_info_config_pavlovvr(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | awk -F '=' '{print $2}') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | awk -F '=' '{print $2}') + + # Not set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + +fn_info_config_col(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") + serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") + maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") + port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") + steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") + rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") + configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") + + # password not set + serverpassword=${serverpassword:-"NOT SET"} + queryport=${port:-"0"} + else + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27004"} + steamport=${steamport:-"27005"} + rconpassword=${rconpassword:-"NOT SET"} + fi +} + +fn_info_config_vintagestory(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + serverpassword="${unavailable}" + port="${unavailable}" + queryport="${unavailable}" + configip="${unavailable}" + else + servername=$(jq -r '.ServerName' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") + serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") + port=$(jq -r '.Port' "${servercfgfullpath}") + queryport=${port:-"0"} + configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") + + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_config_scpsl(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") + tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") + + if [ "${adminpassword}" == "none" ]; then + adminpassword="NOT SET" + fi + else + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} + tickrate=${tickrate:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + fi +} + if [ "${shortname}" == "ac" ]; then fn_info_config_assettocorsa -# ARK: Survival Evolved elif [ "${shortname}" == "ark" ]; then fn_info_config_ark -# Avorion elif [ "${shortname}" == "av" ]; then fn_info_config_avorion -# Ballistic Overkill elif [ "${shortname}" == "bo" ]; then fn_info_config_ballistic_overkill -# Barotrauma elif [ "${shortname}" == "bt" ]; then fn_info_config_barotrauma -# Battalion 1944 elif [ "${shortname}" == "bt1944" ]; then fn_info_config_battalion1944 -# Battlefield: 1942 elif [ "${shortname}" == "bf1942" ]; then fn_info_config_bf1942 -# Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then fn_info_config_bfv -# Chivalry: Medieval Warfare elif [ "${shortname}" == "cmw" ]; then fn_info_config_chivalry -# Call of Duty elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then fn_info_config_cod -# Call of Duty 2 elif [ "${shortname}" == "cod2" ]; then fn_info_config_cod2 -# Call of Duty 4 elif [ "${shortname}" == "cod4" ]; then fn_info_config_cod4 -# Call of Duty: World at War elif [ "${shortname}" == "codwaw" ]; then fn_info_config_codwaw -# Dont Starve Together +elif [ "${shortname}" == "col" ]; then + fn_info_config_col elif [ "${shortname}" == "dst" ]; then fn_info_config_dontstarve -# Eco elif [ "${shortname}" == "eco" ]; then fn_info_config_eco -# Factorio elif [ "${shortname}" == "fctr" ]; then fn_info_config_factorio -# Insurgency: Sandstorm -elif [ "${shortname}" == "inss" ]; then - fn_info_config_inss -# Just Cause 2 elif [ "${shortname}" == "jc2" ]; then fn_info_config_justcause2 -# Just Cause 3 elif [ "${shortname}" == "jc3" ]; then fn_info_config_justcause3 -# Killing Floor 2 elif [ "${shortname}" == "kf2" ]; then fn_info_config_kf2 -# Medal of Honor: Allied Assault elif [ "${shortname}" == "mohaa" ]; then fn_info_config_mohaa -# Memories of Mars elif [ "${shortname}" == "mofm" ]; then fn_info_config_mofm -# QuakeWorld elif [ "${shortname}" == "qw" ]; then fn_info_config_quakeworld -# Quake 2 elif [ "${shortname}" == "q2" ]; then fn_info_config_quake2 -# Quake 3 elif [ "${shortname}" == "q3" ]; then fn_info_config_quake3 -# Quake Live elif [ "${shortname}" == "ql" ]; then fn_info_config_quakelive -# Jedi Knight II: Jedi Outcast elif [ "${shortname}" == "jk2" ]; then fn_info_config_jk2 -# Minecraft elif [ "${shortname}" == "mc" ]; then fn_info_config_minecraft -# Minecraft Bedrock elif [ "${shortname}" == "mcb" ]; then fn_info_config_minecraft_bedrock -# Onset elif [ "${shortname}" == "onset" ]; then fn_info_config_onset -# Post Scriptum: The Bloody Seventh elif [ "${shortname}" == "pstbs" ]; then fn_info_config_pstbs -# Project Cars elif [ "${shortname}" == "pc" ]; then fn_info_config_projectcars -# Project Zomboid elif [ "${shortname}" == "pz" ]; then fn_info_config_projectzomboid -# ARMA 3 elif [ "${shortname}" == "arma3" ]; then fn_info_config_realvirtuality -# Return to Castle Wolfenstein elif [ "${shortname}" == "rtcw" ]; then fn_info_config_rtcw -# Rising World elif [ "${shortname}" == "rw" ]; then fn_info_config_risingworld -# Serious Sam -elif [ "${shortname}" == "ss3" ]; then - fn_info_config_seriousengine35 -# Soldat elif [ "${shortname}" == "sol" ]; then fn_info_config_soldat -# Soldier Of Fortune 2: Gold Edition elif [ "${shortname}" == "sof2" ]; then fn_info_config_sof2 -# Source Engine Games elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then fn_info_config_source -# Starbound elif [ "${shortname}" == "sb" ]; then fn_info_config_starbound -# Teamspeak 3 elif [ "${shortname}" == "ts3" ]; then fn_info_config_teamspeak3 -# Mumble elif [ "${shortname}" == "mumble" ]; then fn_info_config_mumble -# San Andreas Multiplayer elif [ "${shortname}" == "samp" ]; then fn_info_config_samp -# StickyBots elif [ "${shortname}" == "pstbs" ]; then fn_info_config_sbots -# Teeworlds elif [ "${shortname}" == "tw" ]; then fn_info_config_teeworlds -# Terraria elif [ "${shortname}" == "terraria" ]; then fn_info_config_terraria -# Tower Unite elif [ "${shortname}" == "tu" ]; then fn_info_config_towerunite -# Unreal engine elif [ "${engine}" == "unreal" ]; then fn_info_config_unreal -# Unreal 2 engine elif [ "${engine}" == "unreal2" ]; then fn_info_config_unreal2 -# Unreal 3 engine elif [ "${engine}" == "unreal3" ]; then fn_info_config_unreal3 elif [ "${shortname}" == "ut" ]; then fn_info_config_ut -# 7 Day To Die (unity3d) +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_config_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_config_sdtd elif [ "${shortname}" == "wet" ]; then @@ -1704,9 +1683,12 @@ elif [ "${shortname}" == "mta" ]; then fn_info_config_mta elif [ "${shortname}" == "squad" ]; then fn_info_config_squad -# Stationeers elif [ "${shortname}" == "st" ]; then fn_info_config_stationeers elif [ "${shortname}" == "mh" ]; then fn_info_config_mordhau +elif [ "${shortname}" == "pvr" ];then + fn_info_config_pavlovvr +elif [ "${shortname}" == "vints" ]; then + fn_info_config_vintagestory fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index f7500b695..11da3cc63 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -97,7 +97,7 @@ cpumodel=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed cpucores=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo) cpufreqency=$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//') # CPU usage of the game server pid -if [ "${gameserverpid}" ]; then +if [ -n "${gameserverpid}" ]; then cpuused=$(ps --forest -o pcpu -g "${gameserverpid}"|awk '{s+=$1} END {print s}') cpuusedmhz=$(echo "${cpufreqency} * ${cpuused} / 100" | bc ) fi @@ -227,7 +227,7 @@ netlink=$(ethtool "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') # External IP address if [ -z "${extip}" ]; then - extip=$(curl -s https://api.ipify.org 2>/dev/null) + extip=$(curl --connect-timeout 10 -s https://api.ipify.org 2>/dev/null) exitcode=$? # Should ifconfig.co return an error will use last known IP. if [ ${exitcode} -eq 0 ]; then @@ -264,11 +264,11 @@ if [ "$(command -v jq 2>/dev/null)" ]; then if [ "${steammaster}" == "true" ]; then # Will query server IP addresses first. for queryip in "${queryips[@]}"; do - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) + masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" done # Should that not work it will try the external IP. if [ "${masterserver}" == "0" ]; then - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) + masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 15fd7aa5b..4a834d797 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -572,7 +572,7 @@ fn_info_message_ports(){ parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "dontstarve" "Eco" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Minecraft Bedrock" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "Stationeers" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "wurm") + local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "Barotrauma" "dontstarve" "Eco" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Minecraft Bedrock" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "Stationeers" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "Vintage Story" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then parmslocation="${servercfgdir}/UTWeb.ini" @@ -583,7 +583,7 @@ fn_info_message_ports(){ fi done # engines/games that require editing the parms. - local ports_edit_array=( "Avorion" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) + local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "scpsl" "scpslsm" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then parmslocation="${configdirserver}" @@ -1081,17 +1081,6 @@ fn_info_message_samp(){ } | column -s $'\t' -t } - -fn_info_message_ss3(){ - echo -e "netstat -atunp | grep Sam3_Ded" - echo -e "" - { - echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - } | column -s $'\t' -t -} - fn_info_message_sbots(){ echo -e "netstat -atunp | grep blank1" echo -e "" @@ -1446,6 +1435,44 @@ fn_info_message_warfork(){ } | column -s $'\t' -t } +fn_info_message_pavlovvr(){ + echo "netstat -atunp | grep Pavlov" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Game\tINBOUND\t$((port+400))\tudp" + } | column -s $'\t' -t +} + +fn_info_message_colony(){ + echo -e "netstat -atunp | grep colonyserv" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Steam\tINBOUND\t${steamport}\tudp" + } | column -s $'\t' -t +} + +fn_info_message_vintagestory(){ + echo "netstat -atunp | grep cli" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tTCP" + } | column -s $'\t' -t +} + +fn_info_message_scpsl(){ + echo -e "netstat -atunp | grep SCPSL" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then @@ -1474,6 +1501,8 @@ fn_info_message_select_engine(){ fn_info_message_cod4 elif [ "${shortname}" == "codwaw" ]; then fn_info_message_codwaw + elif [ "${shortname}" == "col" ]; then + fn_info_message_colony elif [ "${shortname}" == "dst" ]; then fn_info_message_dst elif [ "${shortname}" == "eco" ]; then @@ -1516,6 +1545,8 @@ fn_info_message_select_engine(){ fn_info_message_quakelive elif [ "${shortname}" == "samp" ]; then fn_info_message_samp + elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_message_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_message_sdtd elif [ "${shortname}" == "squad" ]; then @@ -1530,8 +1561,6 @@ fn_info_message_select_engine(){ fn_info_message_starbound elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots - elif [ "${shortname}" == "ss3" ]; then - fn_info_message_ss3 elif [ "${shortname}" == "terraria" ]; then fn_info_message_terraria elif [ "${shortname}" == "ts3" ]; then @@ -1560,8 +1589,12 @@ fn_info_message_select_engine(){ fn_info_message_bfv elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw + elif [ "${shortname}" == "pvr" ]; then + fn_info_message_pavlovvr elif [ "${shortname}" == "rust" ]; then fn_info_message_rust + elif [ "${shortname}" == "vints" ]; then + fn_info_message_vintagestory elif [ "${shortname}" == "wf" ]; then fn_info_message_warfork elif [ "${shortname}" == "wurm" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 93df0309f..782f774d4 100755 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -187,11 +187,6 @@ fn_info_parms_sof2(){ defaultmap=${defaultmap:-"NOT SET"} } -fn_info_parms_ss3(){ - port=${port:-"0"} - queryport=$((port + 1)) -} - fn_info_parms_towerunite(){ port=${port:-"0"} queryport=${queryport:-"0"} @@ -201,6 +196,11 @@ fn_info_parms_teeworlds(){ queryport=${port:-"0"} } +fn_info_parms_pavlovvr(){ + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_unreal(){ defaultmap=${defaultmap:-"NOT SET"} queryport=$((port + 1)) @@ -233,19 +233,18 @@ fn_info_parms_wf(){ webadminport=${webadminport:-"0"} } -# ARK: Survival Evolved +fn_info_parms_queryport(){ + queryport="${port:-"0"}" +} + if [ "${shortname}" == "ark" ]; then fn_info_parms_ark -# ARMA 3 elif [ "${shortname}" == "arma3" ]; then fn_info_parms_realvirtuality -# Barotrauma elif [ "${shortname}" == "bt" ]; then fn_info_parms_barotrauma -# Call of Duty elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then fn_info_parms_cod -# Factorio elif [ "${shortname}" == "fctr" ]; then fn_info_parms_factorio elif [ "${shortname}" == "inss" ]; then @@ -256,38 +255,30 @@ elif [ "${shortname}" == "kf2" ]; then fn_info_parms_kf2 elif [ "${shortname}" == "mohaa" ]; then fn_info_parms_mohaa -#Memories of Mars elif [ "${shortname}" == "mom" ]; then fn_info_parms_mom -# Project Zomboid elif [ "${shortname}" == "pz" ]; then fn_info_parms_projectzomboid +elif [ "${shortname}" == "pvr" ]; then + fn_info_parms_pavlovvr elif [ "${shortname}" == "qw" ]; then fn_info_parms_quakeworld elif [ "${shortname}" == "q2" ]||[ "${shortname}" == "q3" ]; then fn_info_parms_quake2 elif [ "${shortname}" == "rtcw" ]; then fn_info_parms_rtcw -# Rust elif [ "${shortname}" == "rust" ]; then fn_info_parms_rust elif [ "${shortname}" == "samp" ]; then fn_info_parms_samp -# Rising World elif [ "${shortname}" == "rw" ]; then fn_info_parms_risingworld -# Soldier Of Fortune 2: Gold Edition elif [ "${shortname}" == "sof2" ]; then fn_info_parms_sof2 -# Sticky Bots elif [ "${shortname}" == "sbots" ]; then fn_info_parms_stickybots -# Serious Sam -elif [ "${shortname}" == "ss3" ]; then - fn_info_parms_ss3 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then fn_info_parms_source -# Spark elif [ "${engine}" == "spark" ]; then fn_info_parms_spark elif [ "${shortname}" == "tu" ]; then @@ -298,17 +289,17 @@ elif [ "${shortname}" == "mh" ]; then fn_info_parms_mordhau elif [ "${shortname}" == "mta" ]; then fn_info_parms_mta -# Unreal/Unreal 2 engine elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_info_parms_unreal -# Unreal 3 engine elif [ "${engine}" == "unreal3" ]; then fn_info_parms_unreal3 elif [ "${shortname}" == "unt" ]; then fn_info_parms_unturned elif [ "${shortname}" == "ut" ]; then fn_info_parms_ut -# Warfork elif [ "${shortname}" == "wf" ]; then fn_info_parms_wf +# for servers that have a missing queryport from the config +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_parms_queryport fi diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 63589b81c..dbcb27e14 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -316,6 +316,13 @@ elif [ "${shortname}" == "cc" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "col" ]; then + gamedirname="ColonySurvival" + array_configs+=( colserver.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cs" ]; then gamedirname="CounterStrike" array_configs+=( server.cfg ) @@ -429,13 +436,6 @@ elif [ "${shortname}" == "gmod" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "ges" ]; then - gamedirname="GoldenEyeSource" - array_configs+=( server.cfg ) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations elif [ "${shortname}" == "hldm" ]; then gamedirname="HalfLifeDeathmatch" array_configs+=( server.cfg ) @@ -583,6 +583,13 @@ elif [ "${shortname}" == "mumble" ]; then fn_fetch_default_config fn_default_config_remote fn_list_config_locations +elif [ "${shortname}" == "pvr" ]; then + gamedirname="PavlovVR" + fn_check_cfgdir + array_configs+=( Game.ini ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${shortname}" == "pvkii" ]; then gamedirname="PiratesVikingandKnightsII" array_configs+=( server.cfg ) @@ -660,16 +667,9 @@ elif [ "${shortname}" == "rust" ]; then fn_fetch_default_config fn_default_config_remote fn_list_config_locations -elif [ "${shortname}" == "samp" ]; then - gamedirname="SanAndreasMultiplayer" - array_configs+=( server.cfg ) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations -elif [ "${shortname}" == "ss3" ]; then - gamedirname="SeriousSam3BFE" - array_configs+=( server.ini ) +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + gamedirname="SCPSecretLaboratory" + array_configs+=( config_gameplay.txt config_localadmin.txt ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -800,6 +800,13 @@ elif [ "${shortname}" == "unt" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "vints" ]; then + gamedirname="VintageStory" + array_configs+=( serverconfig.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "vs" ]; then gamedirname="VampireSlayer" array_configs+=( server.cfg ) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 979a32805..a3c40da37 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -27,8 +27,6 @@ fn_install_server_files(){ remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.76-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="178a00233cec1e25b69d130107ce1a79" - elif [ "${shortname}" == "ges" ]; then - remote_fileurl="http://linuxgsm.download/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.xz"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e31481f280eed40c9145816bd4f6dc45" elif [ "${shortname}" == "mohaa" ]; then remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then @@ -50,7 +48,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "ut2k4" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9fceaab68554749f4b45be66613b9a15" elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-451-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="42c6839f8cb95907eeef71a1838aa1f7" + remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469a-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-469a-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e3f2ffaab8e23b98d9e825d0244e8b9d" elif [ "${shortname}" == "ut" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; chmodx="noexecute" run="norun"; force="noforce"; md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then @@ -93,7 +91,9 @@ elif [ "${shortname}" == "fctr" ]; then install_factorio_save.sh elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh -elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ges" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh +elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index bd6b6275c..010ff109e 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -495,6 +495,254 @@ fn_check_mod_files_list(){ fi } +fn_mod_exist(){ + modreq=$1 + # requires one parameter, the mod + if [ -f "${modsdir}/${modreq}-files.txt" ]; then + # how many lines is the file list + modsfilelistsize=$(wc -l < "${modsdir}/${modreq}-files.txt") + # if file list is empty + if [ "${modsfilelistsize}" -eq 0 ]; then + fn_mod_required_fail_exist "${modreq}" + fi + else + fn_mod_required_fail_exist "${modreq}" + fi +} + +fn_mod_required_fail_exist(){ + modreq=$1 + # requires one parameter, the mod + fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" + echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." + fn_print_fail_eol_nl + core_exit.sh +} + +fn_mod_liblist_gam_filenames(){ + # clear variables just in case + moddll="" + modso="" + moddylib="" + + # default libraries + case ${gamename} in + "Counter-Strike 1.6") + moddll="mp.dll" + modso="cs.so" + moddylib="cs.dylib" + ;; + "Day of Defeat") + moddll="dod.dll" + modso="dod.so" + moddylib="dod.dylib" + ;; + "Team Fortress Classic") + moddll="tfc.dll" + modso="tfc.so" + moddylib="tfc.dylib" + ;; + "Natural Selection") + moddll="ns.dll" + modso="ns_i386.so" + moddylib="" + ;; + "The Specialists") + moddll="mp.dll" + modso="ts_i386.so" + moddylib="" + ;; + "Half-Life: Deathmatch") + moddll="hl.dll" + modso="hl.so" + moddylib="hl.dylib" + ;; + esac +} + +# modifers for liblist.gam to add/remote metamod binaries +fn_mod_install_liblist_gam_file(){ + + fn_mod_liblist_gam_filenames + + if [ -f "${modinstalldir}/liblist.gam" ]; then + # modify the liblist.gam file to initialize Metamod + logentry="sed replace (dlls\\${moddll}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll in liblist.gam..." + rpldll="s/dlls\\\\${moddll}/addons\/metamod\/dlls\/metamod.dll/g" + sed -i $rpldll "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.dll" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass "${logentry}" + fn_print_ok_eol_nl + fi + + # modify the liblist.gam file to initialize metamod + logentry="sed replace (dlls\\${modso}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_linux in liblist.gam..." + rplso="s/dlls\/${modso}/addons\/metamod\/dlls\/metamod.so/g" + sed -i $rplso "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.so" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass "${logentry}" + fn_print_ok_eol_nl + fi + + # mac os needs to be checked not all mods support mac os + if [ -n "${moddylib}" ]; then + # modify the liblist.gam file to initialize metamod + logentry="sed replace (dlls\\${moddylib}) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_osx in liblist.gam..." + rpldylib="s/dlls\/${moddylib}/addons\/metamod\/dlls\/metamod.dylib/g" + sed -i $rpldylib "${modinstalldir}/liblist.gam" + grep -q "addons/metamod/dlls/metamod.dylib" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + fi +} + +fn_mod_remove_liblist_gam_file(){ + + fn_mod_liblist_gam_filenames + + if [ -f "${modinstalldir}/liblist.gam" ]; then + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.dll) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll in liblist.gam..." + rpldll="s/addons\/metamod\/dlls\/metamod.dll/dlls\\\\${moddll}/g" + sed -i $rpldll "${modinstalldir}/liblist.gam" + grep -q "${moddll}" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out. + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.so) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_linux in liblist.gam..." + rplso="s/addons\/metamod\/dlls\/metamod.so/dlls\/${modso}/g" + sed -i $rplso "${modinstalldir}/liblist.gam" + grep -q "${modso}" "${modinstalldir}/liblist.gam" + exitcode=$? + # if replacement back didn't happen, error out + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # mac os needs to be checked not all mods support mac os + if [ -n "${moddylib}" ]; then + # modify the liblist.gam file back to defaults + logentry="sed replace (addons/metamod/dlls/metamod.dylib) ${modinstalldir}/liblist.gam" + echo -en "modifying gamedll_osx in liblist.gam..." + rpldylib="s/addons\/metamod\/dlls\/metamod.dylib/dlls\/${moddylib}/g" + sed -i $rpldylib "${modinstalldir}/liblist.gam" + grep -q "${moddylib}" "${modinstalldir}/liblist.gam" + # if replacement back didn't happen, error out. + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + fi +} + +fn_mod_install_amxmodx_file(){ + # does plugins.ini exist? + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + # since it does exist, is the entry already in plugins.ini + logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) inserted into ${modinstalldir}/addons/metamod/plugins.ini" + echo -en "adding amxmodx_mm_i386.so in plugins.ini..." + grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + # file exists but the entry does not, let's add it + echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi + else + # create new file and add the mod to it + echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + core_exit.sh + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + fi +} + +fn_mod_remove_amxmodx_file(){ + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + # since it does exist, is the entry already in plugins.ini + logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini" + echo -en "removing amxmodx_mm_i386.so in plugins.ini..." + grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini" + # iIs it found? If so remove it and clean up + exitcode=$? + if [ "${exitcode}" == 0 ]; then + # delete the line we inserted + sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' "${modinstalldir}/addons/metamod/plugins.ini" + # remove empty lines + sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "${logentry}" + fn_print_fail_eol_nl + else + fn_script_log_pass ${logentry} + fn_print_ok_eol_nl + fi + + # if file is empty, remove it. + if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then + rm "${modinstalldir}/addons/metamod/plugins.ini" + fn_script_log_pass "file removed ${modinstalldir}/addons/metamod/plugins.ini because it was empty" + fi + fi + fi +} + ## Database initialisation. mods_list.sh diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index 2244a104c..f60d9b30f 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -12,32 +12,77 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Get a proper URL for mods that don't provide a good one (optional) fn_script_log_info "Retrieving latest mods URLs" -# Metamod -metamodmversion="1.10" -metamodscrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodmversion}/mmsource-latest-linux" -metamodlatestfile=$(wget "${metamodscrapeurl}" -q -O -) -metamoddownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodmversion}" + +# Metamod (Half-life 1 Classic Engine) +metamodversion="1.21.1-am" +metamodlatestfile="metamod-${metamodversion}.zip" +metamoddownloadurl="https://www.amxmodx.org/release/${metamodlatestfile}" metamodurl="${metamoddownloadurl}" +# AMX Mod X: Base +amxxbaseversion="1.8.2" +amxxbasemod="base" +amxxbaselatestfile="amxmodx-${amxxbaseversion}-${amxxbasemod}-linux.tar.gz" +amxxbasedownloadurl="https://www.amxmodx.org/release/${amxxbaselatestfile}" +amxxbaseurl="${amxxbasedownloadurl}" +# AMX Mod X: Counter-Strike +amxxcsversion="1.8.2" +amxxcsmod="cstrike" +amxxcslatestfile="amxmodx-${amxxbaseversion}-${amxxcsmod}-linux.tar.gz" +amxxcsdownloadurl="https://www.amxmodx.org/release/${amxxcslatestfile}" +amxxcsurl="${amxxcsdownloadurl}" +# AMX Mod X: Day of Defeat +amxxdodversion="1.8.2" +amxxdodmod="dod" +amxxdodlatestfile="amxmodx-${amxxdodversion}-${amxxdodmod}-linux.tar.gz" +amxxdoddownloadurl="https://www.amxmodx.org/release/${amxxdodlatestfile}" +amxxdodurl="${amxxdoddownloadurl}" +# AMX Mod X: Team Fortress Classic +amxxtfcversion="1.8.2" +amxxtfcmod="tfc" +amxxtfclatestfile="amxmodx-${amxxtfcversion}-${amxxtfcmod}-linux.tar.gz" +amxxtfcdownloadurl="https://www.amxmodx.org/release/${amxxtfclatestfile}" +amxxtfcurl="${amxxtfcdownloadurl}" +# AMX Mod X: Natural Selection +amxxnsversion="1.8.2" +amxxnsmod="ns" +amxxnslatestfile="amxmodx-${amxxnsversion}-${amxxnsmod}-linux.tar.gz" +amxxnsdownloadurl="https://www.amxmodx.org/release/${amxxnslatestfile}" +amxxnsurl="${amxxnsdownloadurl}" +# AMX Mod X: The Specialists +amxxtsversion="1.8.2" +amxxtsmod="ts" +amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" +amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" +amxxtsurl="${amxxtsdownloadurl}" +# Metamod:Source +metamodsourceversion="1.10" +metamodsourcescrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodsourceversion}/mmsource-latest-linux" +metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) +metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" +metamodsourceurl="${metamodsourcedownloadurl}" # Sourcemod -sourcemodmversion="1.10" -sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/sourcemod-latest-linux" +sourcemodversion="1.10" +sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodversion}/sourcemod-latest-linux" sourcemodlatestfile=$(wget "${sourcemodscrapeurl}" -q -O -) -sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}" +sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodversion}" sourcemodurl="${sourcemoddownloadurl}" # Steamworks steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" -steamworkslatestfile=$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) +steamworkslatestfile=$(curl --connect-timeout 10 -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4) steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" steamworksurl="${steamworksdownloadurl}" # CS:GO Mods -get5scrapepath=$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "\K(.+)(?=)") -get5latestfile=$(echo -e "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo -e "basename "@""") -get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}" -get5url="${get5downloadurl}" +get5lastbuild=$(curl --connect-timeout 10 -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/json | jq -r '.artifacts[]') +get5latestfile=$(echo -e "${get5lastbuild}" | jq -r '.fileName') +get5latestfilepath=$(echo -e "${get5lastbuild}" | jq -r '.relativePath') +get5url="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5latestfilepath}" +csgopuglatest=$(curl --connect-timeout 10 -sL https://api.github.com/repos/splewis/csgo-pug-setup/releases/latest | jq '.assets[]') +csgopuglatestfile=$(echo -e "${csgopuglatest}" | jq -r '.name') +csgopuglatestlink=$(echo -e "${csgopuglatest}" | jq -r '.browser_download_url') # Oxide -oxiderustlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') -oxidehurtworldlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') -oxidesdtdlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url' ) +oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url') +oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url') +oxidesdtdlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url' ) # Define mods information (required) @@ -64,15 +109,36 @@ modseparator="MOD" # [12] | "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install # [13] | "Short Description" a description showed to the user upon installation/removal +# Half-life 1 Engine Mods +mod_info_metamod=( MOD "metamod" "Metamod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/plugins.ini;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://github.com/alliedmodders/metamod-hl1" "Plugins Framework" ) +mod_info_base_amxx=( MOD "amxmodx" "AMX Mod X: Base" "${amxxbaseurl}" "${amxxbaselatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;Day of Defeat;Team Fortress Classic;Natural Selection;The Specialists;Half-Life: Deathmatch;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod)" ) + +# CS 1.6 (HL1) Engine Mods +mod_info_cs_amxx=( MOD "amxmodxcs" "AMX Mod X: Counter-Strike" "${amxxcsurl}" "${amxxcslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Counter-Strike 1.6;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) + +# DOD (HL1) Engine Mods +mod_info_dod_amxx=( MOD "amxmodxdod" "AMX Mod X: Day of Defeat" "${amxxdodurl}" "${amxxdodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Day of Defeat;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) + +# TFC (HL1) Engine Mods +mod_info_tfc_amxx=( MOD "amxmodxtfc" "AMX Mod X: Team Fortress Classic" "${amxxtfcurl}" "${amxxtfclatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Team Fortress Classic;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) + +# NS (Natural Selection) (HL1) Engine Mods +mod_info_ns_amxx=( MOD "amxmodxns" "AMX Mod X: Natural Selection" "${amxxnsurl}" "${amxxnslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "Natural Selection;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) + +# TS (The Specialists) (HL1) Engine Mods +mod_info_ts_amxx=( MOD "amxmodxts" "AMX Mod X: The Specialists" "${amxxtsurl}" "${amxxtslatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/amxmodx/configs;" "ENGINES" "The Specialists;" "NOTGAMES" "https://www.amxmodx.org" "Admin Features (requires Metamod & AMX Mod X: Base)" ) + # Source mods -mod_info_metamod=( MOD "metamod" "MetaMod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" ) -mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires MetaMod)" ) +mod_info_metamodsource=( MOD "metamodsource" "Metamod: Source" "${metamodsourceurl}" "${metamodsourcelatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" ) +mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires Metamod: Source)" ) mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn" ) +mod_info_stripper=( MOD "stripper" "Stripper Source" "http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git129-linux.tar.gz" "stripper-1.2.2-git129-linux.tar.gz" "0" "LowercaseOff" "${systemdir}" "addons/stripper/maps;" "ENGINES" "Counter-Strike: Global Offensive;Counter-Strike: Source;Day of Defeat: Source;Half Life: Deathmatch;Half Life 2: Deathmatch;Insurgency;Left 4 Dead;Left 4 Dead 2;Nuclear Dawn;Team Fortress 2;" "NOTGAMES" "http://www.bailopan.net/stripper/" "Add or remove objects from map (requires MetaMod)") # CS:GO Mods mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" ) -mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodmversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) +mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) +mod_info_pug=( MOD "pug" "PUG" "${csgopuglatestlink}" "${csgopuglatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/csgo-pug-setup" "plugin for setting up private pug/10man games" ) # Garry's Mod Addons mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) @@ -88,11 +154,10 @@ mod_info_wiremodextras=( MOD "wiremod-extras" "Wiremod Extras" "https://github.c mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/gamemodes" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" ) mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" ) - # Oxidemod mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins" ) mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins" ) mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins" ) # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_pug[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 3c5ff38bf..2443c6e99 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -38,7 +38,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi if [ "${gdplayers}" == "null" ]; then unset gdplayers - elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then + elif [ "${gdplayers}" == "[]" ]||[ "${gdplayers}" == "-1" ]; then gdplayers=0 fi diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index ded4d8206..3e01e4203 100755 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -94,12 +94,14 @@ fn_update_factorio_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_factorio_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -112,6 +114,7 @@ fn_update_factorio_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index c2bdca1b6..bddb7ec93 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of jk2 servers. -local commandname="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_jk2_dl(){ fn_fetch_file "https://github.com/mvdevs/jk2mv/releases/download/${remotebuild}/jk2mv-v${remotebuild}-dedicated.zip" "" "" "" "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "" "norun" "noforce" "nomd5" @@ -30,6 +28,7 @@ fn_update_jk2_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. + requirerestart=1 localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2>/dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" @@ -118,11 +117,14 @@ fn_update_jk2_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_jk2_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 9915f39b3..bd8bd3d33 100755 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -7,14 +7,12 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_minecraft_dl(){ - if [ "${branch}" == "release" ]; then - latestmcreleaselink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release as $latest | .versions[] | select(.id == $latest) | .url') - else - latestmcreleaselink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.versions[0].url') - fi + # Generate link to version manifest json. + remotebuildlink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${remotebuild} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') + # Generate link to server.jar + remotebuildurl=$(curl -s "${remotebuildlink}" | jq -r '.downloads.server.url') - latestmcbuildurl=$(curl -s "${latestmcreleaselink}" | jq -r '.downloads.server.url') - fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nomd5" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nomd5" echo -e "copying to ${serverfiles}...\c" cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" local exitcode=$? @@ -34,53 +32,30 @@ fn_update_minecraft_dl(){ fn_update_minecraft_localbuild(){ # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses log file to gather info. - localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') - if [ -z "${localbuild}" ]; then - fn_print_error "Checking local build: ${remotelocation}" - fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" - fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart" - fn_script_log_error "No log files containing version info" - fn_script_log_info "Forcing server restart" - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - command_start.sh - fn_firstcommand_reset - totalseconds=0 - localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') - while [ -z "${localbuild}" ]; do - sleep 1 - fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}" - if [ -v "${loopignore}" ]; then - loopignore=1 - fn_script_log_info "Waiting for log file to generate" - fi - - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2>/dev/null)" | tail -1 | sed 's/.*Version //') - if [ "${totalseconds}" -gt "120" ]; then - localbuild="0" - fn_print_error "Checking local build: ${remotelocation}: waiting for log file" - fn_script_log_error "Local build did not generate" - fn_script_log_error "Required log file may be missing" - fn_script_log_error "Local build set to 0" - fi - totalseconds=$((totalseconds + 1)) - done - fi - if [ "${localbuild}" != "0" ]; then + # Uses executable to find local build. + cd "${executabledir}" || exit + if [ -f "minecraft_server.jar" ]; then + localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" + else + localbuild="0" + fn_print_error "Checking local build: ${remotelocation}" + fn_script_log_error "Checking local build" fi } fn_update_minecraft_remotebuild(){ # Gets remote build info. - if [ "${branch}" == "release" ]; then + # Latest release. + if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release') + # Latest snapshot. + elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then + remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.snapshot') + # Specific release/snapshot. else - remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.versions[0].id') + remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${mcversion} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') fi if [ "${firstcommandname}" != "INSTALL" ]; then @@ -113,10 +88,10 @@ fn_update_minecraft_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" - echo -en "\n" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -128,11 +103,14 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -145,6 +123,7 @@ fn_update_minecraft_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 925e85635..e12a3cc8e 100755 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_minecraft_dl(){ - latestmcbuildurl=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') + latestmcbuildurl=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then @@ -34,6 +34,7 @@ fn_update_minecraft_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. + requirerestart=1 localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" @@ -77,7 +78,7 @@ fn_update_minecraft_localbuild(){ fn_update_minecraft_remotebuild(){ # Gets remote build info. - remotebuild=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + remotebuild=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. @@ -122,11 +123,14 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -139,6 +143,7 @@ fn_update_minecraft_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index bb5f744ea..e4e803d68 100755 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -30,6 +30,7 @@ fn_update_mta_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Gives time for log file to generate. + requirerestart=1 if [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -151,11 +152,14 @@ fn_update_mta_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mta_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -168,6 +172,7 @@ fn_update_mta_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index dfe8b317a..5221f0503 100755 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -87,11 +87,14 @@ fn_update_mumble_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mumble_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -104,6 +107,7 @@ fn_update_mumble_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 11ad0598c..0733a57d2 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -6,190 +6,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_steamcmd_localbuild(){ - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - fn_appmanifest_check - # Uses appmanifest to find local build. - localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - - # Set branch to public if no custom branch. - if [ -z "${branch}" ]; then - branch="public" - fi - - # Checks if localbuild variable has been set. - if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then - fn_print_fail "Checking local build: ${remotelocation}" - fn_script_log_fatal "Checking local build" - core_exit.sh - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_steamcmd_remotebuild(){ - # Gets remote build info. - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - - # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then - find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; - fi - - if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" -betapassword "${betapassword}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - elif [ -n "${branch}" ]; then - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - else - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - fi - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_steamcmd_compare(){ - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fn_script_log_info "${localbuild} > ${remotebuild}" - - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_dl_steamcmd - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_dl_steamcmd - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fi -} - -fn_appmanifest_info(){ - appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) -} - -fn_appmanifest_check(){ - fn_appmanifest_info - # Multiple or no matching appmanifest files may sometimes be present. - # This error is corrected if required. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_error "Multiple appmanifest_${appid}.acf files found" - fn_script_log_error "Multiple appmanifest_${appid}.acf files found" - fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" - for appfile in ${appmanifestfile}; do - rm -f "${appfile:?}" - done - appmanifestfilewc1="${appmanifestfilewc}" - fn_appmanifest_info - # if error can not be resolved. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - echo -e "* Check user permissions" - for appfile in ${appmanifestfile}; do - echo -e " ${appfile}" - done - core_exit.sh - else - fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fi - elif [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_error_nl "No appmanifest_${appid}.acf found" - fn_script_log_error "No appmanifest_${appid}.acf found" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fn_appmanifest_info - if [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_fail_nl "Still no appmanifest_${appid}.acf found" - fn_script_log_fatal "Still no appmanifest_${appid}.acf found" - core_exit.sh - fi - fi -} +# init steamcmd functions +core_steamcmd.sh # The location where the builds are checked and downloaded. remotelocation="SteamCMD" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index b4fc5d692..bea143ff5 100755 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -34,6 +34,7 @@ fn_update_ts3_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Gives time for log file to generate. + requirerestart=1 if [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -149,11 +150,14 @@ fn_update_ts3_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_ts3_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning @@ -166,6 +170,7 @@ fn_update_ts3_compare(){ command_start.sh fn_firstcommand_reset fi + unset exitbypass date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh new file mode 100755 index 000000000..093f27c8d --- /dev/null +++ b/lgsm/functions/update_vintagestory.sh @@ -0,0 +1,147 @@ +#!/bin/bash +# LinuxGSM update_vintagestory.sh function +# Author: Christian Birk +# Website: https://linuxgsm.com +# Description: Handles updating of Vintage Story servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_vs_dl(){ + # get version info for download + remotebuildresponse=$(curl -s "${apiurl}" | jq --arg version "${remotebuild}" '.[$version].server') + remotebuildfile=$(echo -e "${remotebuildresponse}" | jq -r '.filename') + remotebuildlink=$(echo -e "${remotebuildresponse}" | jq -r '.urls.cdn') + remotebuildmd5=$(echo -e "${remotebuildresponse}" | jq -r '.md5') + + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildlink}" "" "" "" "${tmpdir}" "${remotebuildfile}" "nochmodx" "norun" "force" "${remotebuildmd5}" + fn_dl_extract "${tmpdir}" "${remotebuildfile}" "${serverfiles}" + fn_clear_tmp +} + +fn_update_vs_localbuild(){ + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses executable to find local build. + cd "${executabledir}" || exit + if [ -f "${executable}" ]; then + localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + else + localbuild="0" + fn_print_error "Checking local build: ${remotelocation}" + fn_script_log_error "Checking local build" + fi +} + +fn_update_vs_remotebuild(){ + if [ "${branch}" == "stable" ]; then + remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + else + remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + fi + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_vs_compare(){ + # Removes dots so if statement can compare version numbers. + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "${localbuild} > ${remotebuild}" + + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + exitbypass=1 + fn_update_vs_dl + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_vs_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="vintagestory.at" +apiurl="http://api.${remotelocation}/stable-unstable.json" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_vs_remotebuild + fn_update_vs_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_vs_localbuild + fn_update_vs_remotebuild + fn_update_vs_compare +fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 8e8c14dcc..cb767a770 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.1" +version="v20.6.2" shortname="core" gameservername="core" commandname="CORE" @@ -99,7 +99,7 @@ fn_bootstrap_fetch_file(){ # Larger files show a progress bar. echo -en "fetching ${fileurl_name} ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) local exitcode=$? @@ -160,7 +160,8 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -411,6 +412,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" @@ -420,6 +430,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then diff --git a/tests/tests_defaultcfg/defaultcfg_0.txt b/tests/tests_defaultcfg/defaultcfg_0.txt index 50c1d0ee6..bcaa9f1dd 100644 --- a/tests/tests_defaultcfg/defaultcfg_0.txt +++ b/tests/tests_defaultcfg/defaultcfg_0.txt @@ -1,8 +1,6 @@ stats displayip postalert -postdays -posttarget discordalert discordwebhook emailalert @@ -19,10 +17,13 @@ mailgunemail pushbulletalert pushbullettoken channeltag -pushoveralert -pushovertoken +rocketchatalert +rocketchatwebhook +rocketchattoken slackalert slackwebhook +pushoveralert +pushovertoken telegramalert telegramtoken telegramchatid @@ -38,6 +39,8 @@ sleeptime stopmode querymode querytype +consoleverbose +consoleinteract gamename engine glibc diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 3d98b862f..55a05f99f 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.1" +version="v20.6.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" @@ -167,7 +167,8 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -420,6 +421,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" @@ -429,6 +439,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then @@ -937,6 +956,8 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 35316674f..2eb1815f3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.1" +version="v20.6.2" shortname="jc2" gameservername="jc2server" commandname="CORE" @@ -168,7 +168,8 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -421,6 +422,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" @@ -430,6 +440,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then @@ -1096,6 +1115,8 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 8b8cae16c..8797e78e8 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.1" +version="v20.6.2" shortname="mc" gameservername="mcserver" commandname="CORE" @@ -168,7 +168,8 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -421,6 +422,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" @@ -430,6 +440,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then @@ -969,6 +988,8 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index ff296e160..3883d8dc2 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.1" +version="v20.6.2" shortname="ts3" gameservername="ts3server" commandname="CORE" @@ -168,7 +168,8 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + # If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork. + if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else @@ -421,6 +422,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" @@ -430,6 +440,15 @@ else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then @@ -936,6 +955,8 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" +echo "${version}" >> "${lockdir}/${selfname}.lock" +echo "${port}" >> "${lockdir}/${selfname}.lock" ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5"