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

Give rsync its own onion address

So that if you give out an onion email/xmpp address you're not necessarily also giving access to files
parent a6fce0a4
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ VARIANTS='full full-vim'
APP_CATEGORY=sync
IN_DEFAULT_INSTALL=0
INSTALLED_ON_DEFAULT_DOMAIN=1
INSTALLED_ON_DEFAULT_DOMAIN=0
SHOW_ON_ABOUT=1
RSYNC_DATA=/var/lib/rsync
......@@ -156,6 +156,9 @@ function remove_rsync {
userdel -r rsync
rm -rf "$RSYNC_DATA"
function_check remove_onion_service
remove_onion_service rsync ${RSYNC_PORT}
if grep -q "127.0.0.1:$RSYNC_PORT" "/etc/torrc.d/${PROJECT_NAME}"; then
sed -i "/127.0.0.1:$RSYNC_PORT/d" "/etc/torrc.d/${PROJECT_NAME}"
systemctl restart tor
......@@ -178,6 +181,8 @@ function install_rsync {
mkdir /etc/rsync
fi
RSYNC_ONION_HOSTNAME=$(add_onion_service rsync ${RSYNC_PORT} ${RSYNC_PORT})
rsync_translated_str=$(web_admin_translate_text "Files on your local network")
{ echo 'pid file = /var/run/rsyncd.pid';
......
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