mirror of
				https://github.com/pelican-eggs/eggs.git
				synced 2025-10-31 17:08:06 +00:00 
			
		
		
		
	remove download config file just coppy the exapmle and fix the reinstall issue with the -o flag for unzip
This commit is contained in:
		
							parent
							
								
									03dc87e5bd
								
							
						
					
					
						commit
						0f8574c343
					
				| @ -4,7 +4,7 @@ | ||||
|         "version": "PTDL_v2", | ||||
|         "update_url": null | ||||
|     }, | ||||
|     "exported_at": "2022-09-30T18:17:45+02:00", | ||||
|     "exported_at": "2022-09-30T18:42:39+02:00", | ||||
|     "name": "Veloren", | ||||
|     "author": "parker@parkervcp.com", | ||||
|     "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", | ||||
| @ -15,14 +15,14 @@ | ||||
|     "file_denylist": [], | ||||
|     "startup": ".\/veloren-server-cli", | ||||
|     "config": { | ||||
|         "files": "{\r\n    \"userdata\/server\/server_config\/settings.ron\": {\r\n        \"parser\": \"file\",\r\n        \"find\": {\r\n            \"    gameserver_address\": \"    gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n            \"    metrics_address\": \"    metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n            \"    server_name\": \"    server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n        }\r\n    }\r\n}", | ||||
|         "files": "{\r\n    \"userdata\/server\/server_config\/settings.ron\": {\r\n        \"parser\": \"file\",\r\n        \"find\": {\r\n            \"    address\": \"    address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n            \"    metrics_address\": \"    metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n            \"    server_name\": \"    server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n        }\r\n    }\r\n}", | ||||
|         "startup": "{\r\n    \"done\": \"Server is ready to accept connections\"\r\n}", | ||||
|         "logs": "{}", | ||||
|         "stop": "shutdown graceful 10" | ||||
|     }, | ||||
|     "scripts": { | ||||
|         "installation": { | ||||
|             "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n    DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\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})\r\n    else\r\n        echo -e \"invalid ${RELEASE_DATE}\"\r\n    fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n    wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron -O \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n    echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", | ||||
|             "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n    DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\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})\r\n    else\r\n        echo -e \"invalid ${RELEASE_DATE}\"\r\n    fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n    cp \/mnt\/server\/userdata\/server\/server_config\/settings.template.ron \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n    echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", | ||||
|             "container": "debian:bullseye-slim", | ||||
|             "entrypoint": "bash" | ||||
|         } | ||||
|  | ||||
| @ -1,36 +0,0 @@ | ||||
| ( | ||||
|     gameserver_protocols: [ | ||||
|         Tcp( | ||||
|             address: "[::]:25568", | ||||
|         ), | ||||
|         Tcp( | ||||
|             address: "0.0.0.0:25568", | ||||
|         ), | ||||
|     ], | ||||
|     metrics_address: "0.0.0.0:25569", | ||||
|     auth_server_address: Some("https://auth.veloren.net"), | ||||
|     max_players: 100, | ||||
|     world_seed: 230, | ||||
|     server_name: "A ptero hosted server", | ||||
|     start_time: 32400.0, | ||||
|     map_file: None, | ||||
|     max_view_distance: Some(65), | ||||
|     max_player_group_size: 6, | ||||
|     client_timeout: ( | ||||
|         secs: 40, | ||||
|         nanos: 0, | ||||
|     ), | ||||
|     spawn_town: None, | ||||
|     max_player_for_kill_broadcast: None, | ||||
|     calendar_mode: Auto, | ||||
|     gameplay: ( | ||||
|         battle_mode: Global(PvP), | ||||
|         safe_spawn: false, | ||||
|         explosion_burn_marks: true, | ||||
|     ), | ||||
|     moderation: ( | ||||
|         banned_words_files: [], | ||||
|         automod: false, | ||||
|         admins_exempt: true, | ||||
|     ), | ||||
| ) | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user