domain check fixed
Now we prevent an error for invalid filename.
This commit is contained in:
parent
fb68954dba
commit
4088125ee0
|
@ -90,9 +90,7 @@ dbword_check() {
|
|||
|
||||
|
||||
wpinstall() {
|
||||
local dom=${domain//./_}
|
||||
local dom=${dom//-/_}
|
||||
[[ $domain == "-mysql" ]] && dom="Webinoly_$(pwgen -s -1)"
|
||||
[[ $domain == "-mysql" ]] && local dom="Webinoly_$(pwgen -s -1)" || local dom=$(echo $domain | sed "s/[^0-9A-Za-z]/_/g")
|
||||
local ROOT_PASS=$( echo $(conf_read mysql-root) | openssl enc -d -a -salt )
|
||||
local AUTOGENPASS_WPDB=`pwgen -s -1`
|
||||
local setupmysql="y"
|
||||
|
@ -478,7 +476,10 @@ deletesite() {
|
|||
|
||||
|
||||
createsite() {
|
||||
# Check domain and then prevent reserved characters for file names.
|
||||
domain_check $domain
|
||||
domain=$(echo $domain | sed "s/[^\.0-9A-Za-z\-]/_/g")
|
||||
|
||||
if [[ $(conf_read php) != "true" && ("$wp" == [123] || "$type" == "-php") ]]; then
|
||||
echo "${red}"
|
||||
echo " [ERROR] PHP must be installed before you can create a WP site!"
|
||||
|
|
BIN
webinoly.tar
BIN
webinoly.tar
Binary file not shown.
Loading…
Reference in a new issue