|
|
|
|
218
|
echo '' >> $ghost_config
|
218
|
echo '' >> $ghost_config
|
219
|
echo 'config = {' >> $ghost_config
|
219
|
echo 'config = {' >> $ghost_config
|
220
|
echo ' production: {' >> $ghost_config
|
220
|
echo ' production: {' >> $ghost_config
|
221
|
- if [[ $ONION_ONLY == 'no' ]]; then
|
|
|
222
|
- echo " url: 'https://${GHOST_DOMAIN_NAME}'," >> $ghost_config
|
|
|
223
|
- else
|
|
|
224
|
- echo " url: 'http://${GHOST_DOMAIN_NAME}'," >> $ghost_config
|
|
|
225
|
- fi
|
|
|
|
|
221
|
+ echo ' // This needs to be http and NOT https' >> $ghost_config
|
|
|
222
|
+ echo " url: 'http://${GHOST_DOMAIN_NAME}'," >> $ghost_config
|
226
|
echo ' mail: {' >> $ghost_config
|
223
|
echo ' mail: {' >> $ghost_config
|
227
|
echo " transport: 'SMTP'," >> $ghost_config
|
224
|
echo " transport: 'SMTP'," >> $ghost_config
|
228
|
echo ' options: {' >> $ghost_config
|
225
|
echo ' options: {' >> $ghost_config
|
|
|
|
|
344
|
systemctl daemon-reload
|
341
|
systemctl daemon-reload
|
345
|
systemctl start ghost
|
342
|
systemctl start ghost
|
346
|
|
343
|
|
|
|
344
|
+ GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
|
|
|
345
|
+
|
347
|
if [[ ${ONION_ONLY} == "no" ]]; then
|
346
|
if [[ ${ONION_ONLY} == "no" ]]; then
|
348
|
function_check nginx_http_redirect
|
347
|
function_check nginx_http_redirect
|
349
|
nginx_http_redirect ${GHOST_DOMAIN_NAME}
|
348
|
nginx_http_redirect ${GHOST_DOMAIN_NAME}
|
|
|
|
|
386
|
echo 'server {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
385
|
echo 'server {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
387
|
echo " listen 127.0.0.1:${GHOST_ONION_PORT} default_server;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
386
|
echo " listen 127.0.0.1:${GHOST_ONION_PORT} default_server;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
388
|
echo " root /var/www/$GHOST_DOMAIN_NAME/htdocs;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
387
|
echo " root /var/www/$GHOST_DOMAIN_NAME/htdocs;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
389
|
- echo " server_name $GHOST_DOMAIN_NAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
|
|
|
|
388
|
+ echo " server_name $GHOST_ONION_HOSTNAME;" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
390
|
echo ' access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
389
|
echo ' access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
391
|
echo " error_log /var/log/nginx/${GHOST_DOMAIN_NAME}_error.log ${WEBSERVER_LOG_LEVEL};" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
390
|
echo " error_log /var/log/nginx/${GHOST_DOMAIN_NAME}_error.log ${WEBSERVER_LOG_LEVEL};" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
392
|
echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
391
|
echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
|
|
|
|
|
420
|
function_check configure_php
|
419
|
function_check configure_php
|
421
|
configure_php
|
420
|
configure_php
|
422
|
|
421
|
|
423
|
- GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
|
|
|
424
|
if [[ $ONION_ONLY != 'no' ]]; then
|
422
|
if [[ $ONION_ONLY != 'no' ]]; then
|
425
|
sed -i "s|url: .*|url: 'http://${GHOST_ONION_HOSTNAME}',|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
|
423
|
sed -i "s|url: .*|url: 'http://${GHOST_ONION_HOSTNAME}',|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
|
426
|
systemctl restart ghost
|
424
|
systemctl restart ghost
|