-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5801b1e
commit ea22f80
Showing
4 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
#!/bin/bash | ||
# customrized cmd powered by Websoft9 | ||
# customized cmd powered by Websoft9 | ||
|
||
echo $TYPO3_DB_USER | ||
echo "TYPO3 DB User: $TYPO3_DB_USER" | ||
if [[ -f /var/www/html/wizard ]]; then | ||
echo "Initialization has been completed before this time!" | ||
else | ||
echo "" >> /var/www/html/wizard | ||
sed -i s/127.0.0.1/mysql/g /var/www/html/typo3_src-11.5.12/typo3/sysext/install/Classes/Controller/InstallerController.php | ||
cat InstallerController.php |grep username|grep TYPO3_CONF_VARS| awk '{print $NF}' | ||
cat InstallerController.php |grep username|grep TYPO3_CONF_VARS| awk '{print $NF}' | ||
|
||
sed -i "s/\['user'\] ?? ''/['user'] ?? '$TYPO3_DB_USER'/" /var/www/html/typo3_src-11.5.14/typo3/sysext/install/Classes/Controller/InstallerController.php | ||
sed -i "s/\['password'\] ?? ''/['password'] ?? '$TYPO3_DB_PASSWORD'/" /var/www/html/typo3_src-11.5.14/typo3/sysext/install/Classes/Controller/InstallerController.php | ||
sed -i "s/\['host'\] ?? '127.0.0.1'/['host'] ?? '$TYPO3_DB_HOST'/" /var/www/html/typo3_src-11.5.14/typo3/sysext/install/Classes/Controller/InstallerController.php | ||
# 标记初始化已完成 | ||
touch /var/www/html/wizard | ||
|
||
# 定义 InstallerController.php 文件的路径模式 | ||
installer_pattern="/var/www/html/typo3_src-*/typo3/sysext/install/Classes/Controller/InstallerController.php" | ||
|
||
# 使用定义的路径模式查找文件,并对每个文件执行 sed 替换 | ||
find /var/www/html -type f -path "$installer_pattern" -exec sed -i "s/127.0.0.1/mysql/g" {} \; | ||
find /var/www/html -type f -path "$installer_pattern" -exec sed -i "s/\['user'\] ?? ''/\['user'\] ?? '$TYPO3_DB_USER'/" {} \; | ||
find /var/www/html -type f -path "$installer_pattern" -exec sed -i "s/\['password'\] ?? ''/\['password'\] ?? '$TYPO3_DB_PASSWORD'/" {} \; | ||
find /var/www/html -type f -path "$installer_pattern" -exec sed -i "s/\['host'\] ?? '127.0.0.1'/\['host'\] ?? '$TYPO3_DB_HOST'/" {} \; | ||
fi | ||
docker-php-entrypoint apache2-foreground | ||
|
||
# 启动 Apache | ||
docker-php-entrypoint apache2-foreground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
{ | ||
"dist": "community", | ||
"version": [ | ||
"12.4.8", | ||
"12.4", | ||
"latest" | ||
] | ||
} | ||
|