Fix locking

This commit is contained in:
Philipp Holzer 2023-05-19 16:48:59 +02:00
parent 7dbded3edd
commit e9d8daaccf
Signed by: nupplaPhil
GPG Key ID: 24A7501396EB5432
20 changed files with 30 additions and 20 deletions

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/nextcloud-init-sync.lock

View File

@ -74,7 +74,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
( (
if ! flock -n 9; then if ! flock -n 9; then
# If we couldn't get it immediately, show a message, then wait for real # If we couldn't get it immediately, show a message, then wait for real
echo "Another process is initializing Nextcloud. Waiting..." echo "Another process is initializing Friendica. Waiting..."
flock 9 flock 9
fi fi
@ -179,7 +179,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Upgrading finished" echo "Upgrading finished"
fi fi
fi fi
) 9> /var/www/html/nextcloud-init-sync.lock ) 9> /var/www/html/friendica-init-sync.lock
fi fi
exec "$@" exec "$@"

View File

@ -7,3 +7,4 @@
/storage/ /storage/
/log/ /log/
*.log *.log
/friendica-init-sync.lock