OSDN Git Service

luci-app-unblockneteasemusic: bump to 2.13
[immortalwrt/luci.git] / applications / luci-app-unblockneteasemusic / root / usr / share / unblockneteasemusic / log_check.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-3.0-only
3 # Copyright (C) 2019-2022 Tianling Shen <cnsztl@immortalwrt.org>
4
5 NAME="unblockneteasemusic"
6
7 log_max_size="4" #使用KB计算
8 log_file="/tmp/$NAME.log"
9
10 log_size="$(expr $(ls -l "${log_file}" | awk -F ' ' '{print $5}') / "1024")"
11 [ "${log_size}" -lt "${log_max_size}" ] || echo "" > "${log_file}"