File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,11 @@ The following flags are a list of all the currently supported options that can b
3333| REAL_IP_HEADER | set to 1 to enable real ip support in the logs |
3434| REAL_IP_FROM | set to your CIDR block for real ip in logs |
3535| RUN_SCRIPTS | Set to 1 to execute scripts |
36+ | SCRIPTS_DIR | Change default scripts dir from ` /var/www/html/scripts ` to your own setting |
3637| PGID | Set to GroupId you want to use for nginx (helps permissions when using local volume) |
3738| PUID | Set to UserID you want to use for nginx (helps permissions when using local volume) |
3839| REMOVE_FILES | Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files) |
3940| APPLICATION_ENV | Set this to development to prevent composer deleting local development dependencies |
4041| SKIP_CHOWN | Set to 1 to avoid running chown -Rf on /var/www/html |
42+ | SKIP_CHMOD | Set to 1 to avoid running chmod -Rf 750 on ` SCRIPTS_DIR ` |
4143| SKIP_COMPOSER | Set to 1 to avoid installing composer |
Original file line number Diff line number Diff line change 205205
206206# Run custom scripts
207207if [[ " $RUN_SCRIPTS " == " 1" ]] ; then
208- if [ -d " /var/www/html/scripts/" ]; then
209- # make scripts executable incase they aren't
210- chmod -Rf 750 /var/www/html/scripts/* ; sync;
208+ scripts_dir=" ${SCRIPTS_DIR:-/ var/ www/ html/ scripts} "
209+ if [ -d " $scripts_dir " ]; then
210+ if [ -z " $SKIP_CHMOD " ]; then
211+ # make scripts executable incase they aren't
212+ chmod -Rf 750 $scripts_dir ; sync;
213+ fi
211214 # run scripts in number order
212- for i in ` ls /var/www/html/scripts/ ` ; do /var/www/html/scripts /$i ; done
215+ for i in ` ls $scripts_dir ` ; do $scripts_dir /$i ; done
213216 else
214217 echo " Can't find script directory"
215218 fi
You can’t perform that action at this time.
0 commit comments