1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00
* Update logrotate.sh

* Update backup-db.sh
This commit is contained in:
Mart124 2019-11-25 16:36:06 +01:00 committed by Kyle Spearrin
parent 8b5e37d349
commit 9bb6476f53
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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