git onion port
This commit is contained in:
parent
e7d02f6091
commit
6575c2a4d9
|
@ -6708,7 +6708,21 @@ quit" > $INSTALL_DIR/batch.sql
|
||||||
|
|
||||||
nginx_ensite $GIT_DOMAIN_NAME
|
nginx_ensite $GIT_DOMAIN_NAME
|
||||||
|
|
||||||
GIT_ONION_HOSTNAME=$(add_onion_service gogs 80 ${GIT_ONION_PORT})
|
if [ ! -d /var/lib/tor ]; then
|
||||||
|
echo $'No Tor installation found. Gogs onion site cannot be configured.'
|
||||||
|
exit 877367
|
||||||
|
fi
|
||||||
|
if ! grep -q "hidden_service_gogs" /etc/tor/torrc; then
|
||||||
|
echo 'HiddenServiceDir /var/lib/tor/hidden_service_gogs/' >> /etc/tor/torrc
|
||||||
|
echo "HiddenServicePort ${GIT_ONION_HOSTNAME} 127.0.0.1:${GIT_ONION_HOSTNAME}" >> /etc/tor/torrc
|
||||||
|
echo "HiddenServicePort 9418 127.0.0.1:9418" >> /etc/tor/torrc
|
||||||
|
echo $'Added onion site for Gogs'
|
||||||
|
fi
|
||||||
|
|
||||||
|
systemctl restart tor
|
||||||
|
sleep 8
|
||||||
|
|
||||||
|
GIT_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_gogs/hostname)
|
||||||
|
|
||||||
systemctl restart php5-fpm
|
systemctl restart php5-fpm
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
@ -6719,7 +6733,9 @@ quit" > $INSTALL_DIR/batch.sql
|
||||||
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
|
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
|
||||||
chmod 600 /home/$MY_USERNAME/README
|
chmod 600 /home/$MY_USERNAME/README
|
||||||
fi
|
fi
|
||||||
echo "Gogs onion domain:${GIT_ONION_HOSTNAME}" >> $COMPLETION_FILE
|
if ! grep -q "Gogs onion domain" $COMPLETION_FILE; then
|
||||||
|
echo "Gogs onion domain:${GIT_ONION_HOSTNAME}" >> $COMPLETION_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
# update the dynamic DNS
|
# update the dynamic DNS
|
||||||
CURRENT_DDNS_DOMAIN=$GIT_DOMAIN_NAME
|
CURRENT_DDNS_DOMAIN=$GIT_DOMAIN_NAME
|
||||||
|
|
Loading…
Reference in New Issue