mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
perf: 进程抢占优化;webui优化
This commit is contained in:
1 parent
a6bfba9647
commit
e66b26a2e5
17 files changed
+817
-94
No files matched your search
+12
-9
@@ -22,29 +22,32 @@ get_config() {
|
||||
}
|
||||
|
||||
_log() {
|
||||
printf '[%s] [service] %s\n' "$(date '+%d %H:%M:%S.%3N')" "$1" >>"$log_file"
|
||||
local level="${2:-INFO}"
|
||||
printf '[%s] [%s] [%-8s] %s\n' "$(date '+%m-%d %H:%M:%S')" "service" "$level" "$1" >>"$log_file"
|
||||
}
|
||||
|
||||
# 等待系统就绪
|
||||
sleep 30
|
||||
|
||||
_log "LuminPro 已启动"
|
||||
_log "- 前台最大亮度: $(cat "$CONFIG_DIR/ui_max_bri.txt")"
|
||||
_log "- 峰值最大亮度: $(cat "$CONFIG_DIR/max_bri.txt")"
|
||||
_log "- 休眠时间: $(cat "$CONFIG_DIR/sleep_time.txt")"
|
||||
_log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" "START"
|
||||
_log "LuminPro 模块已启动" "SUCCESS"
|
||||
_log "前台最大亮度: $(cat "$CONFIG_DIR/ui_max_bri.txt")" "INFO"
|
||||
_log "峰值最大亮度: $(cat "$CONFIG_DIR/max_bri.txt")" "INFO"
|
||||
_log "休眠时间: $(cat "$CONFIG_DIR/sleep_time.txt")" "INFO"
|
||||
|
||||
# 读取设备路径配置
|
||||
now_bri_file="$(get_config "$PATH_CONFIG_DIR/now_bri_file.txt" "$DEFAULT_NOW_BRI_FILE")"
|
||||
max_bri_file="$(get_config "$PATH_CONFIG_DIR/max_bri_file.txt" "$DEFAULT_MAX_BRI_FILE")"
|
||||
_log "- 当前亮度节点: $now_bri_file"
|
||||
_log "- 最大亮度节点: $max_bri_file"
|
||||
_log "当前亮度节点: $now_bri_file" "INFO"
|
||||
_log "最大亮度节点: $max_bri_file" "INFO"
|
||||
|
||||
_log "LuminPro 启动守护监控..."
|
||||
_log "启动守护监控进程..." "WAIT"
|
||||
chmod 755 "$MODDIR/script/up.sh"
|
||||
chmod 755 "$MODDIR/script/daemon.sh"
|
||||
|
||||
# 启动守护进程
|
||||
sh "$MODDIR/script/daemon.sh" &
|
||||
_log "- 守护进程 PID: $!"
|
||||
_log "守护进程已启动 (PID: $!)" "SUCCESS"
|
||||
_log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" "DONE"
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user