Changeset 23551


Ignore:
Timestamp:
2014/06/13 22:54:23 (7 years ago)
Author:
shutta
Message:

#1980 インストールシェルの2.12対応
config.phpの作成部分を関数として分離。
かつ、ROOT_URLPATH、ADMIN_DIRも設定可能なように改良。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/eccube_install.sh

    r23550 r23551  
    3333HTTP_URL=${HTTP_URL:-"http://test.local"} 
    3434HTTPS_URL=${HTTPS_URL:-"http://test.local/"} 
     35ROOT_URLPATH=${ROOT_URLPATH:-"/"} 
    3536DOMAIN_NAME=${DOMAIN_NAME:-""} 
     37ADMIN_DIR=${ADMIN_DIR:-"admin/"} 
    3638 
    3739DBSERVER=${DBSERVER-"127.0.0.1"} 
     
    6668;; 
    6769esac 
     70 
     71 
     72####################################################################### 
     73# Functions 
     74 
     75create_config_php() 
     76{ 
     77    cat > "./${CONFIG_PHP}" <<__EOF__ 
     78<?php 
     79define('ECCUBE_INSTALL', 'ON'); 
     80define('HTTP_URL', '${HTTP_URL}'); 
     81define('HTTPS_URL', '${HTTPS_URL}'); 
     82define('ROOT_URLPATH', '${ROOT_URLPATH}'); 
     83define('DOMAIN_NAME', '${DOMAIN_NAME}'); 
     84define('DB_TYPE', '${DBTYPE}'); 
     85define('DB_USER', '${DBUSER}'); 
     86define('DB_PASSWORD', '${CONFIGPASS:-$DBPASS}'); 
     87define('DB_SERVER', '${DBSERVER}'); 
     88define('DB_NAME', '${DBNAME}'); 
     89define('DB_PORT', '${DBPORT}'); 
     90define('ADMIN_DIR', '${ADMIN_DIR}'); 
     91define('ADMIN_FORCE_SSL', FALSE); 
     92define('ADMIN_ALLOW_HOSTS', 'a:0:{}'); 
     93define('AUTH_MAGIC', '${AUTH_MAGIC}'); 
     94define('PASSWORD_HASH_ALGOS', 'sha256'); 
     95define('MAIL_BACKEND', 'mail'); 
     96define('SMTP_HOST', ''); 
     97define('SMTP_PORT', ''); 
     98define('SMTP_USER', ''); 
     99define('SMTP_PASSWORD', ''); 
     100 
     101__EOF__ 
     102} 
    68103 
    69104 
     
    189224 
    190225echo "creating ${CONFIG_PHP}..." 
    191 cat > "./${CONFIG_PHP}" <<EOF 
    192 <?php 
    193 define('ECCUBE_INSTALL', 'ON'); 
    194 define('HTTP_URL', '${HTTP_URL}'); 
    195 define('HTTPS_URL', '${HTTPS_URL}'); 
    196 define('ROOT_URLPATH', '/'); 
    197 define('DOMAIN_NAME', '${DOMAIN_NAME}'); 
    198 define('DB_TYPE', '${DBTYPE}'); 
    199 define('DB_USER', '${DBUSER}'); 
    200 define('DB_PASSWORD', '${CONFIGPASS:-$DBPASS}'); 
    201 define('DB_SERVER', '${DBSERVER}'); 
    202 define('DB_NAME', '${DBNAME}'); 
    203 define('DB_PORT', '${DBPORT}'); 
    204 define('ADMIN_DIR', 'admin/'); 
    205 define('ADMIN_FORCE_SSL', FALSE); 
    206 define('ADMIN_ALLOW_HOSTS', 'a:0:{}'); 
    207 define('AUTH_MAGIC', '${AUTH_MAGIC}'); 
    208 define('PASSWORD_HASH_ALGOS', 'sha256'); 
    209 define('MAIL_BACKEND', 'mail'); 
    210 define('SMTP_HOST', ''); 
    211 define('SMTP_PORT', ''); 
    212 define('SMTP_USER', ''); 
    213 define('SMTP_PASSWORD', ''); 
    214  
    215 EOF 
     226create_config_php 
    216227 
    217228echo "Finished Successful!" 
Note: See TracChangeset for help on using the changeset viewer.