From dae155afd1dd2bed4d1bab1f6137b27d4a767d54 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 May 2023 21:55:59 -0400 Subject: improve readability --- wordpress/wordpress-config-info | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'wordpress') diff --git a/wordpress/wordpress-config-info b/wordpress/wordpress-config-info index 4438995..e51175d 100755 --- a/wordpress/wordpress-config-info +++ b/wordpress/wordpress-config-info @@ -13,12 +13,19 @@ wp_table_prefix_get() find_wp_config() { + # If input contains a slash then it is an absolute path. + # Otherwise it is a subdirectory or subvolume of . case "$1" in */*) ;; *) set -- /srv/"$1" ;; esac - for wp_config in "$1" "$1"/wp-config.php "$1"/wordpress/wp-config.php "$1"/public_html/wp-config.php "$1"/public_html/wordpress/wp-config.php + for wp_config in \ + "$1" \ + "$1"/wp-config.php \ + "$1"/wordpress/wp-config.php \ + "$1"/public_html/wp-config.php \ + "$1"/public_html/wordpress/wp-config.php do if [ -f "$wp_config" ] then -- cgit v1.2.3