generated from zj/archlinux-pkg
fix23
This commit is contained in:
2
PKGBUILD
2
PKGBUILD
@@ -62,4 +62,6 @@ package() {
|
|||||||
install -m755 manual_usb_check.sh "${pkgdir}${_starter_dir}/manual_usb_check.sh"
|
install -m755 manual_usb_check.sh "${pkgdir}${_starter_dir}/manual_usb_check.sh"
|
||||||
install -m644 usb-disk-repair.desktop "${pkgdir}/usr/share/applications/usb-disk-repair.desktop"
|
install -m644 usb-disk-repair.desktop "${pkgdir}/usr/share/applications/usb-disk-repair.desktop"
|
||||||
|
|
||||||
|
install -m644 tms-ssh.conf "${pkgdir}${_starter_dir}/tms-ssh.conf"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,4 +138,18 @@ post_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
mv -f /home/smart/.tms3/starter/tms-ssh.conf /etc/ssh/ssh_config.d/tms-ssh.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## arg 1: the new package version
|
||||||
|
## arg 2: the old package version
|
||||||
|
pre_upgrade() {
|
||||||
|
rm -f /etc/ssh/ssh_config.d/tms-ssh.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
## arg 1: the new package version
|
||||||
|
## arg 2: the old package version
|
||||||
|
post_upgrade() {
|
||||||
|
mv -f /home/smart/.tms3/starter/tms-ssh.conf /etc/ssh/ssh_config.d/tms-ssh.conf
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
4
tms-bbt-config/tms-ssh.conf
Normal file
4
tms-bbt-config/tms-ssh.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
HostKeyAlgorithms +ssh-rsa
|
||||||
|
HostKeyAlgorithms +ssh-rsa
|
||||||
|
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||||
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
|
||||||
@@ -8,6 +8,7 @@ curl -s -X POST -d 'userName=admin&userPassword=admin' -c "$COOKIE_FILE" http://
|
|||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "错误: 登录 SmartTMS_S3 失败。请检查服务是否运行或网络连接。"
|
echo "错误: 登录 SmartTMS_S3 失败。请检查服务是否运行或网络连接。"
|
||||||
rm -f "$COOKIE_FILE" # 清理可能不完整的cookie文件
|
rm -f "$COOKIE_FILE" # 清理可能不完整的cookie文件
|
||||||
|
sleep 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "登录成功。"
|
echo "登录成功。"
|
||||||
@@ -18,6 +19,7 @@ JSON_RESPONSE=$(curl -s -X POST -b "$COOKIE_FILE" 'http://127.0.0.1:8080/SmartTM
|
|||||||
if [ $? -ne 0 ] || [ -z "$JSON_RESPONSE" ]; then
|
if [ $? -ne 0 ] || [ -z "$JSON_RESPONSE" ]; then
|
||||||
echo "错误: 无法获取系统配置信息或返回为空。检查tms是否启动"
|
echo "错误: 无法获取系统配置信息或返回为空。检查tms是否启动"
|
||||||
rm -f "$COOKIE_FILE"
|
rm -f "$COOKIE_FILE"
|
||||||
|
sleep 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -26,6 +28,7 @@ KEY_ENCODING=$(echo "$JSON_RESPONSE" | sed -n 's/.*"result":{[^}]*"code":"\([^"]
|
|||||||
if [ -z "$KEY_ENCODING" ]; then
|
if [ -z "$KEY_ENCODING" ]; then
|
||||||
echo "错误: 无法从接口响应中提取到有效的密钥编码。检查配置中是否填写影院编码"
|
echo "错误: 无法从接口响应中提取到有效的密钥编码。检查配置中是否填写影院编码"
|
||||||
rm -f "$COOKIE_FILE"
|
rm -f "$COOKIE_FILE"
|
||||||
|
sleep 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user