Skip to content

Commit

Permalink
Add custom domain in server info
Browse files Browse the repository at this point in the history
  • Loading branch information
kimzuni committed May 3, 2024
1 parent 8191fe9 commit 2e5425c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ENV TZ="UTC" \
DISCORD_PRE_START_MESSAGE_URL="" \
DISCORD_SERVER_INFO_MESSAGE_ENABLED=true \
DISCORD_SERVER_INFO_MESSAGE_WITH_IP=false \
DISCORD_SERVER_INFO_MESSAGE_WITH_DOMAIN="" \
DISCORD_PRE_SHUTDOWN_MESSAGE="Server is shutting down..." \
DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED=true \
DISCORD_PRE_SHUTDOWN_MESSAGE_URL="" \
Expand Down
2 changes: 1 addition & 1 deletion docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Used with [environment variables](#environment-variables).
| CFG_MAX_PLAYERS | The maximum amount of players the server will allow at the same time. | 32 | 1-? |
| CFG_SERVER_MOTD | A Message Of The Day that will be displayed to the player. | Welcome to Longvinter Island! | "string" |
| CFG_PASSWORD | Use this setting to require a password to join the server. | _(empty)_ | "string" |
| CFG_COMMUNITY_WEBSITE | When the server or community has a website, enter it here to display it to the player. | www\.longvinter\.com | `<example.com>`, `http://<example.com>`, `https://<example.com>` |
| CFG_COMMUNITY_WEBSITE | When the server or community has a website, enter it here to display it to the player. | www\.longvinter\.com | `example.com`, `http://example.com`, `https://example.com/path` |
| CFG_COOP_PLAY | When this setting is set to "true", Co-op Play will be enabled on the server. Set to "false" to disable PvP. | false | true/false |
| CFG_COOP_SPAWN | All players will spawn here. (It only works when "CFG_COOP_PLAY" is "true".) | 0 | 0(West), 1(South), 2(East). (I haven't checked it out) |
| CFG_SERVER_TAG | Server tag that can be used to search for the server. | None | "string" |
Expand Down
4 changes: 2 additions & 2 deletions docs/kr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ docker rmi $(docker images | grep -E ^"(ghcr.io\/)?kimzuni/longvinter-docker-ser
| DISCORD_PRE_START_MESSAGE_ENABLED | 이 값이 `true`인 경우에만 해당 메시지 전송 | true | true/false | 0.1.0 |
| DISCORD_PRE_START_MESSAGE_URL | 해당 메시지를 보낼 디스코드 웹훅 URL (이 값을 비워둘 경우 DISCORD_WEBHOOK_URL 사용) | _(empty)_ | `https://discord.com/api/webhooks/<webhook_id>` | 0.1.0 |
| DISCORD_SERVER_INFO_MESSAGE_ENABLED | 서버 시작 메시지 전송 시 서버 설정 내용을 같이 전송 | true | true/false | 0.1.1 |
| DISCORD_SERVER_INFO_MESSAGE_WITH_IP | 서버 설정 내용 전송 시 서버 IP 및 포트 번호를 같이 전송 (IP로 접속할 때 필요) | false | true/false | 0.1.0 |
| DISCORD_SERVER_INFO_MESSAGE_WITH_IP | 서버 설정 내용 전송 시 서버 IP 및 포트 번호를 같이 전송 ("IP로 접속하기"로 연결할 때 필요) | false | true/false | 0.1.0 |
| DISCORD_PRE_SHUTDOWN_MESSAGE | 서버 종료 전 전송되는 디스코드 메시지 | Server is shutting down... | "string" | 0.1.0 |
| DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED | 이 값이 `true`인 경우에만 해당 메시지 전송 | true | true/false | 0.1.0 |
| DISCORD_PRE_SHUTDOWN_MESSAGE_URL | 해당 메시지를 보낼 디스코드 웹훅 URL (이 값을 비워둘 경우 DISCORD_WEBHOOK_URL 사용) | _(empty)_ | `https://discord.com/api/webhooks/<webhook_id>` | 0.1.0 |
Expand Down Expand Up @@ -503,7 +503,7 @@ AUTO_REBOOT_CRON_EXPRESSION는 크론식으로, 작업을 실행할 시간 또
| CFG_MAX_PLAYERS | 동시 접속 최대 인원 | 32 | 1-? |
| CFG_SERVER_MOTD | 플레이어가 스폰되는 항구 앞 표지판에 표시되는 오늘의 메시지(Message of the Day) | Welcome to Longvinter Island! | "string" |
| CFG_PASSWORD | 서버 접속을 위한 비밀번호 | _(empty)_ | "string" |
| CFG_COMMUNITY_WEBSITE | 게임 내 서버 정보에 표시되는 커뮤니티 및 웹사이트 URL | www\.longvinter\.com | `<example.com>`, `http://<example.com>`, `https://<example.com>` |
| CFG_COMMUNITY_WEBSITE | 게임 내 서버 정보에 표시되는 커뮤니티 및 웹사이트 URL | www\.longvinter\.com | `example.com`, `http://example.com`, `https://example.com/path` |
| CFG_COOP_PLAY | 협동 플레이 여부 (PvP를 활성화한 경우 이 설정은 무시) | false | true/false |
| CFG_COOP_SPAWN | 협동 플레이 활성화 시 스폰 장소 지정 (모두 같은 곳에서 스폰) | 0 | 0(West), 1(South), 2(East). (확인 필요) |
| CFG_SERVER_TAG | 서버 검색에 사용되는 태그 | none | "string" |
Expand Down
5 changes: 4 additions & 1 deletion scripts/helper_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ Server_Info() {
fi

echo "Server Name: $CFG_SERVER_NAME"
if [ "$DISCORD_SERVER_INFO_MESSAGE_WITH_IP" = true ]; then
if [ -z "$DISCORD_SERVER_INFO_MESSAGE_WITH_DOMAIN" ]; then
echo "Server Domain: ${DISCORD_SERVER_INFO_MESSAGE_WITH_DOMAIN#http*://}"
echo "Server Port: $PORT"
elif [ "$DISCORD_SERVER_INFO_MESSAGE_WITH_IP" = true ]; then
echo "Server IP: $(curl -sfSL icanhazip.com)"
echo "Server Port: $PORT"
fi
Expand Down

0 comments on commit 2e5425c

Please sign in to comment.