Move tor services to new file
This commit is contained in:
parent
98c0b563f9
commit
990edc125c
|
@ -655,11 +655,11 @@ function install_gogs {
|
|||
echo $'No Tor installation found. Gogs onion site cannot be configured.'
|
||||
exit 877367
|
||||
fi
|
||||
if ! grep -q "hidden_service_gogs" /etc/tor/torrc; then
|
||||
if ! grep -q "hidden_service_gogs" $ONION_SERVICES_FILE; then
|
||||
{ echo 'HiddenServiceDir /var/lib/tor/hidden_service_gogs/';
|
||||
echo 'HiddenServiceVersion 3';
|
||||
echo "HiddenServicePort 80 127.0.0.1:${GIT_ONION_PORT}";
|
||||
echo "HiddenServicePort 9418 127.0.0.1:9418"; } >> /etc/tor/torrc
|
||||
echo "HiddenServicePort 9418 127.0.0.1:9418"; } >> $ONION_SERVICES_FILE
|
||||
echo $'Added onion site for Gogs'
|
||||
fi
|
||||
|
||||
|
|
|
@ -656,12 +656,12 @@ function install_keyserver {
|
|||
|
||||
chown debian-sks: $sksconf_file
|
||||
|
||||
if ! grep -q "hidden_service_sks" /etc/tor/torrc; then
|
||||
if ! grep -q "hidden_service_sks" $ONION_SERVICES_FILE; then
|
||||
{ echo 'HiddenServiceDir /var/lib/tor/hidden_service_sks/';
|
||||
echo 'HiddenServiceVersion 3';
|
||||
echo "HiddenServicePort 11370 127.0.0.1:11370";
|
||||
echo "HiddenServicePort 11373 127.0.0.1:11371";
|
||||
echo "HiddenServicePort 11372 127.0.0.1:11372"; } >> /etc/tor/torrc
|
||||
echo "HiddenServicePort 11372 127.0.0.1:11372"; } >> $ONION_SERVICES_FILE
|
||||
echo $'Added onion site for sks'
|
||||
fi
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ function remove_xmpp {
|
|||
|
||||
function_check remove_onion_service
|
||||
remove_onion_service xmpp 5222 5223 5269
|
||||
sed -i '/HiddenServiceVersion 2/d' /etc/tor/torrc
|
||||
sed -i '/HiddenServiceVersion 2/d' $ONION_SERVICES_FILE
|
||||
|
||||
apt-mark -q unhold prosody
|
||||
apt-get -yq remove --purge prosody
|
||||
|
@ -1079,11 +1079,11 @@ function install_xmpp {
|
|||
echo $'No Tor installation found. xmpp onion site cannot be configured.'
|
||||
exit 877367
|
||||
fi
|
||||
if ! grep -q "hidden_service_xmpp" /etc/tor/torrc; then
|
||||
if ! grep -q "hidden_service_xmpp" $ONION_SERVICES_FILE; then
|
||||
{ echo 'HiddenServiceDir /var/lib/tor/hidden_service_xmpp/';
|
||||
echo 'HiddenServiceVersion 2';
|
||||
echo "HiddenServicePort 5222 127.0.0.1:5222";
|
||||
echo "HiddenServicePort 5269 127.0.0.1:5269"; } >> /etc/tor/torrc
|
||||
echo "HiddenServicePort 5269 127.0.0.1:5269"; } >> $ONION_SERVICES_FILE
|
||||
echo $'Added onion site for xmpp chat'
|
||||
fi
|
||||
|
||||
|
|
|
@ -224,12 +224,12 @@ function email_create_template {
|
|||
|
||||
function create_email_onion_address {
|
||||
email_hostname='/var/lib/tor/hidden_service_email/hostname'
|
||||
if ! grep -q "hidden_service_email" /etc/tor/torrc; then
|
||||
if ! grep -q "hidden_service_email" $ONION_SERVICES_FILE; then
|
||||
{ echo 'HiddenServiceDir /var/lib/tor/hidden_service_email/';
|
||||
echo 'HiddenServiceVersion 3';
|
||||
echo 'HiddenServicePort 25 127.0.0.1:25';
|
||||
echo 'HiddenServicePort 587 127.0.0.1:587';
|
||||
echo 'HiddenServicePort 465 127.0.0.1:465'; } >> /etc/tor/torrc
|
||||
echo 'HiddenServicePort 465 127.0.0.1:465'; } >> $ONION_SERVICES_FILE
|
||||
|
||||
function_check onion_update
|
||||
onion_update
|
||||
|
|
Loading…
Reference in New Issue