Skip to content
Snippets Groups Projects
Commit 0241abd5 authored by Bob Mottram's avatar Bob Mottram
Browse files

Set the email onion domain as hostname on onion only installs

parent 0f882192
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,20 @@ function create_default_user_removal_daemon {
systemctl enable firststart
}
function final_set_onion_hostname {
if [[ "$ONION_ONLY" == 'no' ]]; then
return
fi
if [ ! -f /var/lib/tor/hidden_service_email/hostname ]; then
echo $'No onion domain for email was found'
exit 368365
fi
onion_domain=$(cat /var/lib/tor/hidden_service_email/hostname)
echo "$onion_domain" > /etc/hostname
hostname "$onion_domain"
}
function setup_final {
function_check update_installed_apps_list
update_installed_apps_list
......@@ -131,6 +145,9 @@ function setup_final {
function_check create_default_user_removal_daemon
create_default_user_removal_daemon
function_check final_set_onion_hostname
final_set_onion_hostname
function_check install_tripwire
install_tripwire
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment