getlivedomain.sh

This will get the currently assigned domain name from WP DB and output it to a file for later use
main
jay 2023-09-05 16:48:04 +00:00
parent 0b8f747b9a
commit 2d9a86222c
1 changed files with 5 additions and 0 deletions

5
getlivedomain.sh 100644
View File

@ -0,0 +1,5 @@
#!/bin/bash
siteURL="`wp option get siteurl | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/'`"
liveDomain="$siteURL"
#echo "$siteURL"
echo "$liveDomain" > /var/www/webroot/ROOT/livedomain