Skip to content

Commit

Permalink
fixed configgeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
gOOvER committed Aug 3, 2024
1 parent 2ac54f9 commit 9775381
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
26 changes: 13 additions & 13 deletions beamng/beammp/egg-beam-m-p-servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-06-01T00:17:27+00:00",
"exported_at": "2024-08-03T04:06:03+00:00",
"name": "BeamMP Servers",
"author": "[email protected]",
"uuid": "6c0281af-ee73-46d9-bc4e-222cc4ecf1ab",
"description": "This is the server for the multiplayer mod BeamMP for the game BeamNG.drive. The server is the point through which all clients communicate. You can write lua mods for the server, detailed instructions on the BeamMP Wiki.",
"features": null,
"features": [],
"docker_images": {
"Debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/BeamMP-Server",
"config": {
"files": "{\r\n \"ServerConfig.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"Name =\": \"Name = \\\"{{env.NAME}}\\\"\",\r\n \"Port =\": \"Port = {{server.build.default.port}}\",\r\n \"AuthKey =\": \"AuthKey = \\\"{{env.AUTHKEY}}\\\"\",\r\n \"Private =\": \"Private = {{env.PRIVATE}}\",\r\n \"MaxPlayers =\": \"MaxPlayers = {{server.build.env.MAX_PLAYERS}}\",\r\n \"Description =\": \"Description = \\\"{{env.DESCRIPTION}}\\\"\",\r\n \"MaxCars =\": \"MaxCars = {{env.MAX_CARS}}\",\r\n \"Map =\": \"Map = \\\"{{env.MAP}}\\\"\",\r\n \"LogChat =\": \"LogChat = {{env.LOGCHAT}}\"\r\n }\r\n }\r\n}",
"files": "{\r\n \"ServerConfig.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"Name =\": \"Name = \\\"{{env.NAME}}\\\"\",\r\n \"Port =\": \"Port = {{server.allocations.default.port}}\",\r\n \"AuthKey =\": \"AuthKey = \\\"{{env.AUTHKEY}}\\\"\",\r\n \"Private =\": \"Private = {{env.PRIVATE}}\",\r\n \"MaxPlayers =\": \"MaxPlayers = {{server.environment.MAX_PLAYERS}}\",\r\n \"Description =\": \"Description = \\\"{{env.DESCRIPTION}}\\\"\",\r\n \"MaxCars =\": \"MaxCars = {{env.MAX_CARS}}\",\r\n \"Map =\": \"Map = \\\"{{env.MAP}}\\\"\",\r\n \"LogChat =\": \"LogChat = {{env.LOGCHAT}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"[INFO] Vehicle data network online\"\r\n}",
"logs": "{}",
"stop": "exit"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n#Remove any old versions\r\nrm -f BeamMP-Server\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\")\r\nMATCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"Server.debian.12.x86_64\" || echo \"Server.debian.12.arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest BeamMP server version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\" | head -1)\r\nelse\r\n echo -e \"Chosen version :${VERSION}. Verifying version from releases\"\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i \"${MATCH}\" | head -1)\r\n else\r\n echo -e \"No valid versions found. Defaulting to the latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"Server\" | grep -i \"debian\" | grep -i \"12\" | grep -i \"x\" | grep -i \"64\" | head -1)\r\n fi\r\nfi\r\n\r\n#Download the BeamMP server binary\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\"\r\ncurl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\r\nchmod +x BeamMP-Server\r\n\r\n#Create a default configuration file\r\necho \"# This is the BeamMP-Server config file.\r\n# Help & Documentation: `https:\/\/wiki.beammp.com\/en\/home\/server-maintenance`\r\n# IMPORTANT: Fill in the AuthKey with the key you got from `https:\/\/keymaster.beammp.com\/` on the left under 'Keys'\r\n\r\n[General]\r\nName = 'BeamMP Server'\r\nPort = 30814\r\n# AuthKey has to be filled out in order to run the server\r\nAuthKey = ''\r\n# Whether to log chat messages in the console \/ log\r\nLogChat = true\r\n# Add custom identifying tags to your server to make it easier to find. Format should be TagA,TagB,TagC. Note the comma seperation.\r\nTags = 'Freeroam'\r\nDebug = false\r\nPrivate = true\r\nMaxCars = 1\r\nMaxPlayers = 8\r\nMap = '\/levels\/gridmap_v2\/info.json'\r\nDescription = 'BeamMP Default Description'\r\nResourceFolder = 'Resources'\r\n\r\n[Misc]\r\n# Hides the periodic update message which notifies you of a new server version. You should really keep this on and always update as soon as possible. For more information visit https:\/\/wiki.beammp.com\/en\/home\/server-maintenance#updating-the-server. An update message will always appear at startup regardless.\r\nImScaredOfUpdates = false\r\n# You can turn on\/off the SendErrors message you get on startup here\r\nSendErrorsShowMessage = true\r\n# If SendErrors is 'true', the server will send helpful info about crashes and other issues back to the BeamMP developers. This info may include your config, who is on your server at the time of the error, and similar general information. This kind of data is vital in helping us diagnose and fix issues faster. This has no impact on server performance. You can opt-out of this system by setting this to 'false'\r\nSendErrors = true\" > ServerConfig.toml\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"script": "#!\/bin\/bash\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n#Remove any old versions\r\nrm -f BeamMP-Server\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\")\r\nMATCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"Server.debian.12.x86_64\" || echo \"Server.debian.12.arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest BeamMP server version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\" | head -1)\r\nelse\r\n echo -e \"Chosen version :${VERSION}. Verifying version from releases\"\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i \"${MATCH}\" | head -1)\r\n else\r\n echo -e \"No valid versions found. Defaulting to the latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"Server\" | grep -i \"debian\" | grep -i \"12\" | grep -i \"x\" | grep -i \"64\" | head -1)\r\n fi\r\nfi\r\n\r\n#Download the BeamMP server binary\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\"\r\ncurl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\r\nchmod +x BeamMP-Server\r\n\r\n#Create a default configuration file\r\ncat > ServerConfig.toml << EOF\r\n# This is the BeamMP-Server config file.\r\n# Help & Documentation: https:\/\/wiki.beammp.com\/en\/home\/server-maintenance\r\n# IMPORTANT: Fill in the AuthKey with the key you got from https:\/\/keymaster.beammp.com\/ on the left under 'Keys'\r\n\r\n[General]\r\nName = 'BeamMP Server'\r\nPort = 30814\r\n# AuthKey has to be filled out in order to run the server\r\nAuthKey = ''\r\n# Whether to log chat messages in the console \/ log\r\nLogChat = true\r\n# Add custom identifying tags to your server to make it easier to find. Format should be TagA,TagB,TagC. Note the comma seperation.\r\nTags = 'Freeroam'\r\nDebug = false\r\nPrivate = true\r\nMaxCars = 1\r\nMaxPlayers = 8\r\nMap = '\/levels\/gridmap_v2\/info.json'\r\nDescription = 'BeamMP Default Description'\r\nResourceFolder = 'Resources'\r\n\r\n[Misc]\r\n# Hides the periodic update message which notifies you of a new server version. You should really keep this on and always update as soon as possible. For more information visit https:\/\/wiki.beammp.com\/en\/home\/server-maintenance#updating-the-server. An update message will always appear at startup regardless.\r\nImScaredOfUpdates = false\r\n# You can turn on\/off the SendErrors message you get on startup here\r\nSendErrorsShowMessage = true\r\n# If SendErrors is 'true', the server will send helpful info about crashes and other issues back to the BeamMP developers. This info may include your config, who is on your server at the time of the error, and similar general information. This kind of data is vital in helping us diagnose and fix issues faster. This has no impact on server performance. You can opt-out of this system by setting this to 'false'\r\nSendErrors = true\r\n\r\nEOF\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
Expand All @@ -37,7 +37,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:128",
"sort": null,
"sort": 1,
"field_type": "text"
},
{
Expand All @@ -48,7 +48,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:128",
"sort": null,
"sort": 2,
"field_type": "text"
},
{
Expand All @@ -59,7 +59,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:12",
"sort": null,
"sort": 3,
"field_type": "text"
},
{
Expand All @@ -70,7 +70,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:64",
"sort": null,
"sort": 4,
"field_type": "text"
},
{
Expand All @@ -81,7 +81,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|max:100",
"sort": null,
"sort": 5,
"field_type": "text"
},
{
Expand All @@ -92,7 +92,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"sort": null,
"sort": 6,
"field_type": "text"
},
{
Expand All @@ -103,7 +103,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|max:10",
"sort": null,
"sort": 7,
"field_type": "text"
},
{
Expand All @@ -114,7 +114,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:64",
"sort": null,
"sort": 8,
"field_type": "text"
},
{
Expand All @@ -125,7 +125,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"sort": null,
"sort": 9,
"field_type": "text"
}
]
Expand Down
Loading

0 comments on commit 9775381

Please sign in to comment.