Skip to content

Commit 07d5c20

Browse files
committed
fix: missing valid from field
1 parent 2f551dd commit 07d5c20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ chmod 755 "$fnCertPath"
152152
chmod 755 "$fnKeyPath"
153153
154154
# 更新数据库
155+
NEW_EFFECT_DATE=$(openssl x509 -startdate -noout -in "$fnCertPath" | sed "s/^.*=\\(.*\\)$/\\1/")
156+
NEW_EFFECT_TIMESTAMP=$(date -d "$NEW_EFFECT_DATE" +%s%3N)
155157
NEW_EXPIRY_DATE=$(openssl x509 -enddate -noout -in "$fnCertPath" | sed "s/^.*=\\(.*\\)$/\\1/")
156158
NEW_EXPIRY_TIMESTAMP=$(date -d "$NEW_EXPIRY_DATE" +%s%3N)
157-
psql -U postgres -d trim_connect -c "UPDATE cert SET valid_to=$NEW_EXPIRY_TIMESTAMP WHERE domain='$domain'"
159+
psql -U postgres -d trim_connect -c "UPDATE cert SET valid_from=$NEW_EFFECT_TIMESTAMP, valid_to=$NEW_EXPIRY_TIMESTAMP WHERE domain='$domain'"
158160
159161
# 重启服务
160162
systemctl restart webdav.service

0 commit comments

Comments
 (0)