hubzilla via onion only
This commit is contained in:
parent
2e93641f17
commit
9b19f65362
|
@ -9071,6 +9071,18 @@ function install_hubzilla {
|
||||||
CURRENT_DDNS_DOMAIN=$HUBZILLA_DOMAIN_NAME
|
CURRENT_DDNS_DOMAIN=$HUBZILLA_DOMAIN_NAME
|
||||||
add_ddns_domain
|
add_ddns_domain
|
||||||
|
|
||||||
|
HUBZILLA_ONION_HOSTNAME=
|
||||||
|
if [[ $ONION_ONLY != "no" ]]; then
|
||||||
|
HUBZILLA_ONION_HOSTNAME=$(add_onion_service hubzilla 80 ${HUBZILLA_ONION_PORT})
|
||||||
|
if ! grep -q "Hubzilla onion domain" /home/$MY_USERNAME/README; then
|
||||||
|
echo "Hubzilla onion domain: ${HUBZILLA_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
|
||||||
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
|
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
|
||||||
|
chmod 600 /home/$MY_USERNAME/README
|
||||||
|
fi
|
||||||
|
echo "Hubzilla onion domain:${HUBZILLA_ONION_HOSTNAME}" >> $COMPLETION_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $ONION_ONLY == "no" ]]; then
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
nginx_http_redirect $HUBZILLA_DOMAIN_NAME
|
nginx_http_redirect $HUBZILLA_DOMAIN_NAME
|
||||||
echo 'server {' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo 'server {' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
|
@ -9148,7 +9160,7 @@ function install_hubzilla {
|
||||||
echo 'server {' > /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo 'server {' > /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo " listen 127.0.0.1:${HUBZILLA_ONION_PORT} default_server;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo " listen 127.0.0.1:${HUBZILLA_ONION_PORT} default_server;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo " root $HUBZILLA_PATH;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo " root $HUBZILLA_PATH;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo " server_name $HUBZILLA_DOMAIN_NAME;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo " server_name $HUBZILLA_ONION_HOSTNAME;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo " error_log /var/log/nginx/${HUBZILLA_DOMAIN_NAME}_error_ssl.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo " error_log /var/log/nginx/${HUBZILLA_DOMAIN_NAME}_error_ssl.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo ' index index.php;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo ' index index.php;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
echo ' charset utf-8;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
echo ' charset utf-8;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME
|
||||||
|
@ -9252,18 +9264,6 @@ function install_hubzilla {
|
||||||
|
|
||||||
nginx_ensite $HUBZILLA_DOMAIN_NAME
|
nginx_ensite $HUBZILLA_DOMAIN_NAME
|
||||||
|
|
||||||
HUBZILLA_ONION_HOSTNAME=
|
|
||||||
if [[ $ONION_ONLY != "no" ]]; then
|
|
||||||
HUBZILLA_ONION_HOSTNAME=$(add_onion_service hubzilla 80 ${HUBZILLA_ONION_PORT})
|
|
||||||
if ! grep -q "Hubzilla onion domain" /home/$MY_USERNAME/README; then
|
|
||||||
echo "Hubzilla onion domain: ${HUBZILLA_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
|
||||||
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
|
|
||||||
chmod 600 /home/$MY_USERNAME/README
|
|
||||||
fi
|
|
||||||
echo "Hubzilla onion domain:${HUBZILLA_ONION_HOSTNAME}" >> $COMPLETION_FILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# initialize the database
|
# initialize the database
|
||||||
if [ ! -f $HUBZILLA_PATH/install/schema_mysql.sql ]; then
|
if [ ! -f $HUBZILLA_PATH/install/schema_mysql.sql ]; then
|
||||||
echo $'No database schema found for hubzilla'
|
echo $'No database schema found for hubzilla'
|
||||||
|
|
Loading…
Reference in New Issue