Create onion site later

This commit is contained in:
Bob Mottram 2018-02-02 12:27:42 +00:00
parent a8165e801d
commit 346dfbb0cc
1 changed files with 4 additions and 2 deletions

View File

@ -266,7 +266,6 @@ function install_edith {
fi fi
fi fi
EDITH_ONION_HOSTNAME=$(add_onion_service edith 80 ${EDITH_ONION_PORT})
if [ -d /var/www/$EDITH_DOMAIN_NAME/htdocs ]; then if [ -d /var/www/$EDITH_DOMAIN_NAME/htdocs ]; then
rm -rf /var/www/$EDITH_DOMAIN_NAME/htdocs rm -rf /var/www/$EDITH_DOMAIN_NAME/htdocs
@ -292,9 +291,11 @@ function install_edith {
set_completion_param "edith commit" "$EDITH_COMMIT" set_completion_param "edith commit" "$EDITH_COMMIT"
if [ ! -d /var/www/$EDITH_DOMAIN_NAME/htdocs/data ]; then if [ ! -d /var/www/$EDITH_DOMAIN_NAME/htdocs/data ]; then
mkdir /var/www/$EDITH_DOMAIN_NAME/htdocs/data mkdir -p /var/www/$EDITH_DOMAIN_NAME/htdocs/data
fi fi
EDITH_ONION_HOSTNAME=$(add_onion_service edith 80 ${EDITH_ONION_PORT})
edith_nginx_site=/etc/nginx/sites-available/$EDITH_DOMAIN_NAME edith_nginx_site=/etc/nginx/sites-available/$EDITH_DOMAIN_NAME
if [[ $ONION_ONLY == "no" ]]; then if [[ $ONION_ONLY == "no" ]]; then
function_check nginx_http_redirect function_check nginx_http_redirect
@ -423,6 +424,7 @@ function install_edith {
fi fi
set_completion_param "edith domain" "$EDITH_DOMAIN_NAME" set_completion_param "edith domain" "$EDITH_DOMAIN_NAME"
set_completion_param "edith onion domain" "$EDITH_ONION_HOSTNAME"
chown -R www-data:www-data /var/www/$EDITH_DOMAIN_NAME/htdocs chown -R www-data:www-data /var/www/$EDITH_DOMAIN_NAME/htdocs
chmod a+w /var/www/$EDITH_DOMAIN_NAME/htdocs/data chmod a+w /var/www/$EDITH_DOMAIN_NAME/htdocs/data
nginx_ensite $EDITH_DAEMON_NAME nginx_ensite $EDITH_DAEMON_NAME