mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Fix sleep calculation (#719)
* Fix sleep calculation * Fix sleep calculation
This commit is contained in:
parent
9cb103e6aa
commit
330ff7cd80
@ -3,7 +3,7 @@
|
||||
while true
|
||||
do
|
||||
# Sleep until next day
|
||||
[ "$1" = "loop" ] && sleep $((24 * 3600 - (`date +%H` * 3600 + `date +%M` * 60 + `date +%S`)))
|
||||
[ "$1" = "loop" ] && sleep $((24 * 3600 - (`date +%_H` * 3600 + `date +%_M` * 60 + `date +%_S`)))
|
||||
|
||||
# Backup timestamp
|
||||
export now=$(date +%Y%m%d_%H%M%S)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
while true
|
||||
do
|
||||
[ "$1" = "loop" ] && sleep $((24 * 3600 - (`date +%H` * 3600 + `date +%M` * 60 + `date +%S`)))
|
||||
[ "$1" = "loop" ] && sleep $((24 * 3600 - (`date +%_H` * 3600 + `date +%_M` * 60 + `date +%_S`)))
|
||||
ts=$(date +%Y%m%d_%H%M%S)
|
||||
mv /var/log/nginx/access.log /var/log/nginx/access.$ts.log
|
||||
mv /var/log/nginx/error.log /var/log/nginx/error.$ts.log
|
||||
|
Loading…
Reference in New Issue
Block a user