Changes to mountpoint logic
This commit is contained in:
parent
5943f0df5a
commit
584e56aceb
14
init
14
init
@ -11,7 +11,7 @@ function mp() {
|
||||
mountpoint -q $1
|
||||
local mp=$?
|
||||
set -e
|
||||
return ${mp}
|
||||
echo ${mp}
|
||||
}
|
||||
|
||||
# General Setup
|
||||
@ -27,8 +27,7 @@ if [ "${role}" = "app" -a -e artisan ]; then
|
||||
exec /bin/bash
|
||||
fi
|
||||
|
||||
mp ${php}
|
||||
mp=$?
|
||||
mp=$(mp ${php})
|
||||
|
||||
# Only adjust perms if this is an external mountpoint
|
||||
if [ ${mp} -eq 0 -o -n "${FORCE_PERMS}" ] ; then
|
||||
@ -53,8 +52,7 @@ if [ "${role}" = "app" -a -e artisan ]; then
|
||||
NODEV="--no-dev"
|
||||
fi
|
||||
|
||||
mp ${php}
|
||||
mp=$?
|
||||
mp=$(mp ${composer})
|
||||
|
||||
if [ ${mp} -eq 0 -o -n "${FORCE_PERMS}" ] ; then
|
||||
[ -n "${FORCE_PERMS}" -o "${env}" != "dev" -a -z "${SKIP_PERM}" ] && chown -R www-data:www-data ${composer}
|
||||
@ -84,7 +82,8 @@ elif [ "$role" = "queue" -a -e artisan ]; then
|
||||
fi
|
||||
|
||||
# We only check for non mount points, in case this container has the app inside
|
||||
if ! mp ${php}; then
|
||||
mp=$(mp ${php})
|
||||
if [ ${mp} -eq 1 ]; then
|
||||
echo "* Caching configuration..."
|
||||
su www-data -s /bin/sh -c "(php artisan config:cache && php artisan route:cache && php artisan view:cache)"
|
||||
fi
|
||||
@ -106,7 +105,8 @@ elif [ "$role" = "scheduler" -a -e artisan ]; then
|
||||
fi
|
||||
|
||||
# We only check for non mount points, in case this container has the app inside
|
||||
if ! mp ${php}; then
|
||||
mp=$(mp ${php})
|
||||
if [ ${mp} -eq 1 ]; then
|
||||
echo "* Caching configuration..."
|
||||
su www-data -s /bin/sh -c "(php artisan config:cache && php artisan route:cache && php artisan view:cache)"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user