1
0
mirror of synced 2024-06-09 14:17:53 +02:00

Made 8888 the default port and removed authentication.

This commit is contained in:
Horea Christian 2014-06-28 21:49:45 +02:00
parent 41e6196b2a
commit aaf90e3d62
2 changed files with 5 additions and 5 deletions

View File

@ -74,6 +74,6 @@ einfo "Ensure you open the following ports in your firewall:"
einfo " btsync.conf specified sync listening port (UDP/TCP)"
einfo " port 3838 (UDP) for DHT tracking"
einfo ""
einfo "WebUI listens on: localhost:(8888+UID)"
einfo "WebUI listens on: localhost:(8888), nominally localhost:(7888+UID)"
}

View File

@ -33,10 +33,10 @@ fi
if [ ! -f "${CONF_FILE}" ] ; then
"${BTSYNC_PATH}/bin/${PN}" --dump-sample-config > "${CONF_FILE}" || exit 1
sed -i \
-e "s|\"password\" : \"password\"|\"password\" : \"$(date +%s | sha256sum | base64 | head -c 32)\"|" \
-e "s|\"device_name\": \"My Sync Device\"|\"device_name\": \"$(hostname -f 2>/dev/null||hostname)\"|" \
-e "s|\"login\" : \"admin\"|\"login\" : \"$USER\"|" \
-e "s|\"listen\" : \"0.0.0.0:8888\"|\"listen\" : \"127.0.0.1:$(expr 8888 + $EUID)\"|" \
-e "s|\"password\" : \"password\"||g" \
-e "s|\"device_name\": \"caMy Sync Device\"|\"device_name\": \"$(hostname -f 2>/dev/null||hostname)\"|" \
-e "s|\"login\" : \"admin\",||g" \
-e "s|\"listen\" : \"0.0.0.0:8888\",|\"listen\" : \"127.0.0.1:$(expr 7888 + $EUID)\"|" \
-e "s|\"storage_path\" : \"/home/user/.sync\"|\"storage_path\" : \"${STORAGE_PATH}\"|" \
-e "/\/\/ uncomment next line if you want to set location of pid file/d" \
-e "s|\/\/ \"pid_file\" : \"/var/run/${PN}/${PN}.pid\"| \"pid_file\" : \"${PID_FILE}\"|" "${CONF_FILE}"