mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
20 lines
471 B
Django/Jinja
20 lines
471 B
Django/Jinja
#!/bin/bash
|
|
# Get salt 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
|
|
|
|
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
|
|
cp $BACKUP $DEST
|
|
else
|
|
echo '?>' >> $DEST
|
|
chown root:{{ apache_data }} $DEST
|
|
chmod 640 $DEST
|
|
cp -f $DEST $BACKUP
|
|
fi
|