22 lines
827 B
Bash
22 lines
827 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
mkdir -p /var/www/fic-server/logs; \
|
||
|
chown -R www-data:www-data /var/www/fic-server/shared /var/www/fic-server/PKI; \
|
||
|
chown -R synchro:www-data /var/www/fic-server/submission /var/www/fic-server/logs /var/www/fic-server/out; \
|
||
|
chmod 660 /var/www/fic-server/submission; \
|
||
|
./nginx_gen_team.sh > ./shared/nginx-teams.conf &&
|
||
|
cat <<EOF > /var/www/fic-server/onyx/db/docker.profile.php &&
|
||
|
<?php
|
||
|
|
||
|
if(!defined('ONYX')) exit;
|
||
|
|
||
|
\$___profile['db'] = '$DB_ENV_MYSQL_DATABASE';
|
||
|
\$___profile['host'] = '$DB_PORT_3306_TCP_ADDR';
|
||
|
\$___profile['user'] = '$DB_ENV_MYSQL_USER';
|
||
|
\$___profile['pass'] = '$DB_ENV_MYSQL_PASSWORD';
|
||
|
EOF
|
||
|
sed -i 's/"profile">sample</"profile">docker</' /var/www/fic-server/onyx/config/root.xml &&
|
||
|
# echo 'Copying files...' &&
|
||
|
# ./gen_hash_link_files.sh --copy ./files-in ./files &&
|
||
|
exec "$@"
|