mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-04 13:01:51 +08:00
Merge pull request #1096 from nextcloud/fix/noid/mastercontainer-logs
get rid of some strange lines in the mastercontainer logs
This commit is contained in:
commit
3bc55fb104
1 changed files with 4 additions and 1 deletions
|
@ -2,15 +2,18 @@
|
|||
|
||||
while true; do
|
||||
while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do
|
||||
# First delete all session files that are not authenticated
|
||||
unset SESSION_FILES
|
||||
SESSION_FILES="$(find "/mnt/docker-aio-config/session/" -mindepth 1)"
|
||||
unset SESSION_FILES_ARRAY
|
||||
mapfile -t SESSION_FILES_ARRAY <<< "$SESSION_FILES"
|
||||
for SESSION_FILE in "${SESSION_FILES_ARRAY[@]}"; do
|
||||
if ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then
|
||||
if [ -f "$SESSION_FILE" ] && ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then
|
||||
rm "$SESSION_FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
# Second clean up all sessions that are authenticated
|
||||
echo "Deleting duplicate sessions"
|
||||
unset OLDEST_FILE
|
||||
set -x
|
||||
|
|
Loading…
Reference in a new issue