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

Onion rync integration

parent a747da2c
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@ NOT_ON_HOMEPAGE=1
RSYNC_DOMAIN_NAME=
RSYNC_CODE=
RSYNC_ONION_PORT=9951
RSYNC_PORT=873
# These parameters are used by the FreedomBox mobile app and web UI
......@@ -134,6 +133,11 @@ function remove_rsync {
userdel -r rsync
rm -rf "$RSYNC_DATA"
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
fi
remove_app rsync
remove_completion_param install_rsync
sed -i '/rsync/d' "$COMPLETION_FILE"
......@@ -194,6 +198,11 @@ function install_rsync {
increment_app_install_progress
if ! grep -q "127.0.0.1:$RSYNC_PORT" "/etc/torrc.d/${PROJECT_NAME}"; then
sed -i "/127.0.0.1:5783/a HiddenServicePort $RSYNC_PORT 127.0.0.1:$RSYNC_PORT" "/etc/torrc.d/${PROJECT_NAME}"
systemctl restart tor
fi
systemctl enable rsync
systemctl start rsync
......
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