Skip to content

Commit

Permalink
修改msg.json写逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejun committed Jan 4, 2025
1 parent 7a2b5f1 commit ab54d06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions keepalive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ checkResetCron() {

#构建消息配置文件
makeMsgConfig() {
echo "构造消息配置文件..."
cat >msg.json <<EOF
if [ -n "$TELEGRAM_TOKEN" ] || [ -n "$WXSENDKEY" ]; then
echo "构造消息配置文件..."
cat >msg.json <<EOF
{
"telegram_token": "$TELEGRAM_TOKEN",
"telegram_userid": "$TELEGRAM_USERID",
Expand All @@ -64,6 +65,9 @@ makeMsgConfig() {
"password": "$PASS"
}
EOF
else
echo "TELEGRAM_TOKEN 和 WXSENDKEY 变量均未设置"
fi
}

autoUpdate() {
Expand Down

0 comments on commit ab54d06

Please sign in to comment.