Skip to content

Commit

Permalink
chore:update to v1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasVon2021 committed Nov 28, 2024
1 parent b099b4f commit 209d979
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
13 changes: 9 additions & 4 deletions package/kvmd-web/start.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#!/bin/bash
set -x

# 检测是否存在 /mnt/tmp/firstboot 文件
# check /mnt/tmp/firstboot
check_firstboot() {
if [ -f "/mnt/tmp/firstboot" ]; then
echo "Found /mnt/tmp/firstboot file. Resizing mmcblk0p3 partition..."
resize_mmcblk0p3
# 删除 /mnt/tmp/firstboot 文件

rm -rf /etc/machine-id
rm -rf /var/lib/dbus/machine-id

dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure
# delete /mnt/tmp/firstboot
rm -f "/mnt/tmp/firstboot"
else
echo "No /mnt/tmp/firstboot file found. Skipping partition resizing."
fi
}

# 扩展 mmcblk0p3 分区
# expand mmcblk0p3

resize_mmcblk0p3() {
echo "Resizing mmcblk0p3 partition..."
Expand All @@ -28,7 +34,6 @@ resize_mmcblk0p3() {

echo "Starting partition resizing..."

# 检测并执行扩容操作
check_firstboot

echo "Partition resizing completed."
Expand Down
11 changes: 1 addition & 10 deletions script/install_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def main():
print('kill main done')

# kill kvmd-web
cmd = "ps -aux | grep kvmlink | grep -v grep"
cmd = "ps -aux | grep server_app | grep -v grep"
execute_cmd(cmd,sh_path)
print('kill web done')

Expand Down Expand Up @@ -168,15 +168,6 @@ def main():
subprocess.check_output(cmd, shell = True, cwd=gArgs.releasepath )
print('restart kvmd-web successful')
merge_and_save_config('/tmp/config/app.json', '/mnt/exec/release/config/app.json')
# Check if the local file exists
if os.path.exists('/tmp/config/package.json'):
# Read the local configuration file
with open('/tmp/config/package.json', 'r', encoding='utf-8') as f:
local_config = json.load(f)
if 'version' in local_config:
version = local_config['version']
if compare_versions(version, 'v1.4.9'):
merge_and_save_config('/tmp/config/user.json', '/mnt/exec/release/config/user.json')


else:
Expand Down
2 changes: 1 addition & 1 deletion script/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "v1.5.1",
"version": "v1.5.3",
"md5value": ""
}
2 changes: 1 addition & 1 deletion web_src/web_client

0 comments on commit 209d979

Please sign in to comment.