build: 打包支持rpm

This commit is contained in:
TsMask committed 2024-07-10 17:39:42 +08:00
1 parent 3c186b34ae
commit 40a2b496e6
178 files changed
+201 -32

No files matched your search

@@ -0,0 +1,10 @@
#!/bin/bash
threshold=99 # 设置硬盘使用率的阈值
disk_usage=$(df -h | awk '$NF=="/"{print $(NF-1)}' | sed 's/%//') # 获取根目录的硬盘使用率
if [ $disk_usage -gt $threshold ]; then
echo "Disk usage is above $threshold%. Taking action..."
systemctl restart keepalived
fi