mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-23 10:51:10 +01:00
Check for database configuration
This commit is contained in:
parent
5c8959d938
commit
2ca07e8102
|
@ -43,6 +43,28 @@ checkSaltsEnv() {
|
|||
fi
|
||||
}
|
||||
|
||||
checkDatabaseEnv() {
|
||||
if [ -z "${WORDPRESS_DB_HOST}" ]; then
|
||||
echo "- WORDPRESS_DB_HOST is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_DB_USER}" ]; then
|
||||
echo "- WORDPRESS_DB_USER is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then
|
||||
echo "- WORDPRESS_DB_PASSWORD is not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${WORDPRESS_DB_NAME}" ]; then
|
||||
echo "- WORDPRESS_DB_NAME is not set"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# init-wpconfig-verify main
|
||||
main() {
|
||||
# This will prepend service name to all output from here
|
||||
|
@ -54,5 +76,10 @@ main() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
echo "Checking database configuration..."
|
||||
if ! checkDatabaseEnv; then
|
||||
echo "^^^ Some or all of the database configuration not set. Cannot continue."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
main
|
||||
|
|
Loading…
Reference in New Issue
Block a user