#!/bin/bash #=============================================================================== # Copyright (c) 2014-2015 Samsung Electronics Co., Ltd. # Author onstudy@samsung.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 2 of the License # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. #=============================================================================== HTDOCS_DIR=/var/www/html MODULES_DIR=${HTDOCS_DIR}/drupal/sites/all/modules set -e if [ ! -e "${HTDOCS_DIR}/drupal/sites/default/settings.php" ] then cp /config/settings.php ${HTDOCS_DIR}/drupal/sites/default/settings.php chmod a+w ${HTDOCS_DIR}/drupal/sites/default/settings.php fi if [ ! -e "${HTDOCS_DIR}/drupal/sites/default/default.settings.php" ] then cp /config/default.settings.php ${HTDOCS_DIR}/drupal/sites/default/default.settings.php chmod a+w ${HTDOCS_DIR}/drupal/sites/default/default.settings.php fi if [ ! -d "${HTDOCS_DIR}/drupal/sites/default/files/" ] then mkdir -p ${HTDOCS_DIR}/drupal/sites/default/files/ chmod o+w ${HTDOCS_DIR}/drupal/sites/default/files/ fi chown -R ${APACHE_RUN_USER}:${APACHE_RUN_USER} ${HTDOCS_DIR}/drupal