ghost blog config
This commit is contained in:
parent
af80ae257a
commit
4c7fc03736
|
@ -218,11 +218,8 @@ function ghost_create_config {
|
|||
echo '' >> $ghost_config
|
||||
echo 'config = {' >> $ghost_config
|
||||
echo ' production: {' >> $ghost_config
|
||||
if [[ $ONION_ONLY == 'no' ]]; then
|
||||
echo " url: 'https://${GHOST_DOMAIN_NAME}'," >> $ghost_config
|
||||
else
|
||||
echo ' // This needs to be http and NOT https' >> $ghost_config
|
||||
echo " url: 'http://${GHOST_DOMAIN_NAME}'," >> $ghost_config
|
||||
fi
|
||||
echo ' mail: {' >> $ghost_config
|
||||
echo " transport: 'SMTP'," >> $ghost_config
|
||||
echo ' options: {' >> $ghost_config
|
||||
|
@ -344,6 +341,8 @@ function install_ghost {
|
|||
systemctl daemon-reload
|
||||
systemctl start ghost
|
||||
|
||||
GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
|
||||
|
||||
if [[ ${ONION_ONLY} == "no" ]]; then
|
||||
function_check nginx_http_redirect
|
||||
nginx_http_redirect ${GHOST_DOMAIN_NAME}
|
||||
|
@ -386,7 +385,7 @@ function install_ghost {
|
|||
echo 'server {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo " listen 127.0.0.1:${GHOST_ONION_PORT} default_server;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo " root /var/www/$GHOST_DOMAIN_NAME/htdocs;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo " server_name $GHOST_DOMAIN_NAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo " server_name $GHOST_ONION_HOSTNAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo ' access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo " error_log /var/log/nginx/${GHOST_DOMAIN_NAME}_error.log ${WEBSERVER_LOG_LEVEL};" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
||||
|
@ -420,7 +419,6 @@ function install_ghost {
|
|||
function_check configure_php
|
||||
configure_php
|
||||
|
||||
GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
|
||||
if [[ $ONION_ONLY != 'no' ]]; then
|
||||
sed -i "s|url: .*|url: 'http://${GHOST_ONION_HOSTNAME}',|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
|
||||
systemctl restart ghost
|
||||
|
|
Loading…
Reference in New Issue