mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Softcode wordpress/templates/get-iiab-wp-salts.j2
This commit is contained in:
parent
b696417ec7
commit
be078a9f06
1 changed files with 10 additions and 9 deletions
|
@ -1,16 +1,17 @@
|
|||
#!/bin/bash
|
||||
# Get salt constants and write to wp-keys.php
|
||||
# Download 8 dynamically-generated salt/key constants and write to wp-keys.php
|
||||
#
|
||||
# by Tim Moody tim@timmoody.com
|
||||
DEST=/library/wordpress/wp-keys.php
|
||||
BACKUP=/library/wordpress/wp-keys.php.BAK
|
||||
|
||||
DEST={{ wp_abs_path }}/wp-keys.php # /library/wordpress
|
||||
BACKUP={{ wp_abs_path }}/wp-keys.php.BAK
|
||||
|
||||
echo '<?php' > $DEST
|
||||
curl https://api.wordpress.org/secret-key/1.1/salt/ >> $DEST
|
||||
RC=$?
|
||||
|
||||
# if the download of keys failed, revert to previous version
|
||||
if [ $RC -ne 0 ];then
|
||||
if [ $RC -ne 0 ]; then
|
||||
cp $BACKUP $DEST
|
||||
else
|
||||
echo '?>' >> $DEST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue