update Wordpress salt use printf instead of ed
This commit is contained in:
@@ -25,8 +25,6 @@ define('FS_METHOD','direct');
|
||||
#$table_prefix = 'DBName';
|
||||
$table_prefix = 'wp';
|
||||
|
||||
WPsalty
|
||||
|
||||
define('WP_DEBUG', false);
|
||||
if ( !defined('ABSPATH') )
|
||||
define('ABSPATH', dirname(__FILE__) . '/');
|
||||
@@ -39,4 +37,4 @@ if ( !defined('ABSPATH') )
|
||||
#define('WP_REDIS_HOST', '127.0.0.1');
|
||||
#define('WP_REDIS_PASSWORD', '<RedisPassword>');
|
||||
#define('WP_REDIS_PORT', '6379');
|
||||
require_once(ABSPATH . 'wp-settings.php');
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ rm /var/www/"$domain"/html/wp-config-sample.php
|
||||
#Configuring WordPress
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/WordPress-unconfigured -o /var/www/"$domain"/html/wp-config.php
|
||||
sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' -e 's/DBName/'$db_name'/' -e 's/DOMAINname/'$domain'/' /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "g/WPsalty/d" a "$WPSalts" . w | ed -s /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "$WPSalts" >> /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "require_once(ABSPATH . 'wp-settings.php');" >> /var/www/"$domain"/html/wp-config.php
|
||||
|
||||
#PHP Pool
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||
|
||||
Reference in New Issue
Block a user