18 lines
401 B
Bash
18 lines
401 B
Bash
#!/bin/bash
|
|
source "$(dirname "$0")/utils/jq_util.sh"
|
|
|
|
update_uuid(){
|
|
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # 脚本文件夹绝对路径
|
|
local config_file="$script_dir/../config/config.json"
|
|
|
|
# 生成 UUID
|
|
local uuid=$(cat /proc/sys/kernel/random/uuid)
|
|
|
|
# 修改 UUID
|
|
sed -i 's/你的UUID/'"$uuid"'/g' "$config_file"
|
|
|
|
echo "设置UUID成功."
|
|
}
|
|
|
|
update_uuid
|