Files
tms-arch-linux-calamares-in…/archiso/airootfs/home/smart/unzipKDMs.sh
2025-12-10 00:58:20 +08:00

21 lines
615 B
Bash

#!/bin/bash
cd /home/smart/下载/
ls *.zip | xargs -n1 unzip -o -d /media/kdm/
cd /media/kdm/
ls *.zip | xargs -n1 unzip -o -d /media/kdm/
echo "解压成功"
echo "删除密钥压缩包"
find /media/kdm/ -name "35054491*.zip" -delete
find /home/smart/下载/ -name "35054491*.zip" -delete
sleep 3
echo "刷新密钥"
curl -X POST -d 'userName=admin&userPassword=admin' -c /home/smart/cookie.txt http://127.0.0.1:8080/SmartTMS_S3/LoginController/login.do 2>&1 >/dev/null
curl http://127.0.0.1:8080/SmartTMS_S3/kdmController/updateKdm.do -X POST -b /home/smart/cookie.txt 2>&1 >/dev/null
echo "成功"
sleep 5