-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.command
More file actions
executable file
ยท45 lines (36 loc) ยท 1.47 KB
/
Copy pathstop.command
File metadata and controls
executable file
ยท45 lines (36 loc) ยท 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Lore ๅๆญข่ๆฌ
# ๅๅปๆญคๆไปถๅณๅฏๅๆญข Lore ๆๅก
# ่ทๅ่ๆฌๆๅจ็ฎๅฝ
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
# ๅ ่ฝฝ็ซฏๅฃ้
็ฝฎ๏ผไผๅ
็ฏๅขๅ้๏ผๅ
ถๆฌก .env ๆไปถ๏ผ
load_ports() {
local default_server_port=39527
local default_client_port=39528
# ไป .env ๆไปถ่ฏปๅ
if [ -f "$SCRIPT_DIR/.env" ]; then
local env_server_port=$(grep "^LORE_SERVER_PORT=" "$SCRIPT_DIR/.env" | cut -d'=' -f2 | tr -d ' ')
local env_client_port=$(grep "^LORE_CLIENT_PORT=" "$SCRIPT_DIR/.env" | cut -d'=' -f2 | tr -d ' ')
[ -n "$env_server_port" ] && SERVER_PORT="$env_server_port"
[ -n "$env_client_port" ] && CLIENT_PORT="$env_client_port"
fi
# ็ฏๅขๅ้ไผๅ
็บงๆด้ซ
SERVER_PORT="${LORE_SERVER_PORT:-${SERVER_PORT:-$default_server_port}}"
CLIENT_PORT="${LORE_CLIENT_PORT:-${CLIENT_PORT:-$default_client_port}}"
}
load_ports
echo 'โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'
echo 'โ Lore ๆๅกๅๆญขไธญ... โ'
echo 'โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'
echo ''
echo '้
็ฝฎไฟกๆฏ:'
echo " ๅ็ซฏ็ซฏๅฃ: $SERVER_PORT"
echo " ๅ็ซฏ็ซฏๅฃ: $CLIENT_PORT"
echo ''
./manager.sh stop
echo ''
echo 'ๆๅกๅทฒๅๆญข'
echo ''
echo '็ชๅฃๅฐๅจ 2 ็งๅ่ชๅจๅ
ณ้ญ...'
sleep 2