Ensure upstream files are synced to virtual mount - closes 52

pull/1/head
Jason Kendall 2020-05-28 19:49:27 -04:00
parent 29949f8f5f
commit 3773870ae3
2 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,7 @@ ARG PHP_VER
ssdeep \
libfuzzy2 \
mariadb-client \
rsync \
# Python Requirements
python3 \
python3-setuptools \

View File

@ -88,6 +88,9 @@ init_mysql(){
}
sync_files(){
for DIR in $(ls /var/www/MISP/app/files.dist); do
rsync -azh --delete /var/www/MISP/app/files.dist/$DIR /var/www/MISP/app/files/
done
}
# Things we should do when we have the INITIALIZE Env Flag
@ -103,6 +106,8 @@ echo "Configure Cake | Change Redis host to $REDIS_FQDN ... " && setup_cake_conf
# Things we should do if we're configuring MISP via ENV
echo "Configure MISP | Initialize misp base config..." && init_misp_config
echo "Configure MISP | Sync app files..." && sync_files
echo "Configure MISP | Enforce permissions ..."
echo "... chown -R www-data.www-data /var/www/MISP ..." && find /var/www/MISP -not -user www-data -exec chown www-data.www-data {} +
echo "... chmod -R 0750 /var/www/MISP ..." && find /var/www/MISP -perm 550 -type f -exec chmod 0550 {} + && find /var/www/MISP -perm 770 -type d -exec chmod 0770 {} +