tahoelafs storage node onion service name

This commit is contained in:
Bob Mottram 2017-03-07 11:06:51 +00:00
parent 492946d17f
commit 4501edce9b
1 changed files with 13 additions and 12 deletions

View File

@ -261,9 +261,9 @@ function backup_local_tahoelafs {
}
function restore_local_tahoelafs {
echo $"Restoring Tahoe-LAFS introducer"
echo $"Restoring Tahoe-LAFS"
systemctl stop tahoelafs-storage
systemctl stop tahoelafs-introducer
systemctl stop tahoelafs-client
temp_restore_dir=/root/temptahoelafs
restore_directory_from_usb $temp_restore_dir tahoelafs
mv /home/tahoelafs /home/tahoelafs-old
@ -274,7 +274,7 @@ function restore_local_tahoelafs {
fi
rm -rf /home/tahoelafs-old
chown -R tahoelafs:debian-tor /home/tahoelafs
systemctl start tahoelafs-introducer
systemctl start tahoelafs-client
systemctl start tahoelafs-storage
echo $"Restore complete"
}
@ -285,18 +285,18 @@ function backup_remote_tahoelafs {
return
fi
systemctl stop tahoelafs-storage
systemctl stop tahoelafs-introducer
systemctl stop tahoelafs-client
dest_directory=tahoelafs
function_check backup_directory_to_usb
backup_directory_to_friend $source_directory $dest_directory
systemctl start tahoelafs-introducer
systemctl start tahoelafs-client
systemctl start tahoelafs-storage
}
function restore_remote_tahoelafs {
echo $"Restoring Tahoe-LAFS introducer"
echo $"Restoring Tahoe-LAFS"
systemctl stop tahoelafs-storage
systemctl stop tahoelafs-introducer
systemctl stop tahoelafs-client
temp_restore_dir=/root/temptahoelafs
restore_directory_from_friend $temp_restore_dir tahoelafs
mv /home/tahoelafs /home/tahoelafs-old
@ -307,7 +307,7 @@ function restore_remote_tahoelafs {
fi
rm -rf /home/tahoelafs-old
chown -R tahoelafs:debian-tor /home/tahoelafs
systemctl start tahoelafs-introducer
systemctl start tahoelafs-client
systemctl start tahoelafs-storage
echo $"Restore complete"
}
@ -343,7 +343,7 @@ function remove_tahoelafs {
remove_completion_param install_tahoelafs
function_check remove_onion_service
remove_onion_service tahoelafs ${TAHOELAFS_ONION_PORT}
remove_onion_service tahoelafs-storage ${TAHOELAFS_STORAGE_ONION_PORT}
remove_onion_service storage-tahoelafs ${TAHOELAFS_STORAGE_ONION_PORT}
sed -i '/HidServAuth /d' /etc/tor/torrc
deluser tahoelafs
if [ -d /home/tahoelafs ]; then
@ -417,7 +417,7 @@ function create_tahoelafs_introducer {
}
function create_tahoelafs_storage_node {
# Nodes can store introducer
# Nodes can store data
node_dir="$1"
furl="$2"
@ -583,7 +583,7 @@ function install_tahoelafs {
apt-get -yq install build-essential python-pip python-dev libffi-dev libssl-dev
apt-get -yq install libcrypto++-dev python-pycryptopp python-cffi python-virtualenv
# create a user to run the introducer
# create a user
if [ ! -d /home/tahoelafs ]; then
# add a gogs user account
adduser --disabled-login --gecos 'tahoe-lafs' tahoelafs
@ -610,7 +610,7 @@ function install_tahoelafs {
client_nick=${MY_USERNAME}-client
# create an onion address for storage node
TAHOELAFS_STORAGE_ONION_HOSTNAME=$(add_onion_service tahoelafs-storage ${TAHOELAFS_STORAGE_PORT} ${TAHOELAFS_STORAGE_ONION_PORT} ${node_nick})
TAHOELAFS_STORAGE_ONION_HOSTNAME=$(add_onion_service storage-tahoelafs ${TAHOELAFS_STORAGE_PORT} ${TAHOELAFS_STORAGE_ONION_PORT} ${node_nick})
# create an onion address for client node
TAHOELAFS_ONION_HOSTNAME=$(add_onion_service tahoelafs ${TAHOELAFS_PORT} ${TAHOELAFS_ONION_PORT})
@ -628,6 +628,7 @@ function install_tahoelafs {
create_tahoelafs_daemon "client"
set_completion_param "tahoelafs commit" "$TAHOELAFS_COMMIT"
set_completion_param "tahoelafs onion domain" "$TAHOELAFS_ONION_HOSTNAME"
create_tahoelafs_web
systemctl reload tor