Keep track of sks onion domain

This commit is contained in:
Bob Mottram 2017-07-28 22:57:40 +01:00
parent 73397491f5
commit dfe18fb802
1 changed files with 6 additions and 3 deletions

View File

@ -149,6 +149,7 @@ function remove_keyserver {
firewall_remove 11372 tcp firewall_remove 11372 tcp
sed -i '/keyserver/d' $COMPLETION_FILE sed -i '/keyserver/d' $COMPLETION_FILE
sed -i '/sks onion/d' $COMPLETION_FILE
if [ -d /var/lib/sks ]; then if [ -d /var/lib/sks ]; then
rm -rf /var/lib/sks rm -rf /var/lib/sks
fi fi
@ -299,10 +300,11 @@ function install_keyserver {
onion_update onion_update
wait_for_onion_service 'sks' wait_for_onion_service 'sks'
if [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; then if [ ! -f /var/lib/tor/hidden_service_sks/hostname ]; then
echo $'xmpp onion site hostname not found' echo $'sks onion site hostname not found'
exit 65349 exit 8352982
fi fi
SKS_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_sks/hostname)
KEYSERVER_ONION_HOSTNAME=$(add_onion_service keyserver 80 ${KEYSERVER_ONION_PORT}) KEYSERVER_ONION_HOSTNAME=$(add_onion_service keyserver 80 ${KEYSERVER_ONION_PORT})
@ -410,6 +412,7 @@ function install_keyserver {
set_completion_param "keyserver domain" "$KEYSERVER_DOMAIN_NAME" set_completion_param "keyserver domain" "$KEYSERVER_DOMAIN_NAME"
set_completion_param "keyserver onion domain" "$KEYSERVER_ONION_HOSTNAME" set_completion_param "keyserver onion domain" "$KEYSERVER_ONION_HOSTNAME"
set_completion_param "sks onion domain" "$SKS_ONION_HOSTNAME"
APP_INSTALLED=1 APP_INSTALLED=1
} }