[or-cvs] r12012: Handle multiple restarts of hidden-service script. (in incognito/trunk/root_overlay: etc/init.d usr/share/incognito)

double at seul.org double at seul.org
Thu Oct 18 10:05:57 UTC 2007


Author: double
Date: 2007-10-18 06:05:57 -0400 (Thu, 18 Oct 2007)
New Revision: 12012

Modified:
   incognito/trunk/root_overlay/etc/init.d/hidden-service
   incognito/trunk/root_overlay/usr/share/incognito/readme.html
Log:
Handle multiple restarts of hidden-service script.


Modified: incognito/trunk/root_overlay/etc/init.d/hidden-service
===================================================================
--- incognito/trunk/root_overlay/etc/init.d/hidden-service	2007-10-18 08:15:46 UTC (rev 12011)
+++ incognito/trunk/root_overlay/etc/init.d/hidden-service	2007-10-18 10:05:57 UTC (rev 12012)
@@ -17,6 +17,12 @@
 	declare -i REAL_PORT VIRTUAL_PORT
 	REAL_PORT=8080
 	VIRTUAL_PORT=80
+	# Save/restore a copy of the original /etc/tor/torrc to handle changes in /home/hidden
+	if [[ -s /etc/tor/torrc.bak.hidden ]]; then
+		cp /etc/tor/torrc.bak.hidden /etc/tor/torrc
+	else
+		cp /etc/tor/torrc /etc/tor/torrc.bak.hidden
+	fi
 	for DIR in $(find "/home/hidden" -mindepth 1 -maxdepth 1 -type d); do
 		if [[ -d "${DIR}/conf" ]] && [[ -d "${DIR}/www" ]]; then
 			[[ -s "${DIR}/conf/port" ]] && VIRTUAL_PORT="$(<${DIR}/conf/port)"

Modified: incognito/trunk/root_overlay/usr/share/incognito/readme.html
===================================================================
--- incognito/trunk/root_overlay/usr/share/incognito/readme.html	2007-10-18 08:15:46 UTC (rev 12011)
+++ incognito/trunk/root_overlay/usr/share/incognito/readme.html	2007-10-18 10:05:57 UTC (rev 12012)
@@ -500,7 +500,13 @@
 <p>
 The host name to use for the hidden service can be found in the /home/hidden/[name]/conf/hostname file for that service. This file is created by Tor when configuring the hidden service. The host name will be the same across sessions and machines as it and the private key are stored in the /home/hidden/[name]/conf directory.
 </p>
-
+<p>
+Changes to /home/hidden (service addition/removal, /home/hidden/[name]/conf change) can be applied using the following command from a terminal. To get a terminal on full, type "Alt-F2", "konsole". On tiny right-click on the desktop and choose "xterm".
+<code>
+su -c /etc/init.d/hidden-service restart
+</code>
+Note that content changes in /home/hidden/[name]/www should take effect immediately without running the above command.
+</p>
 <ul>
 <li><a href="https://tor-svn.freehaven.net/svn/incognito/trunk/root_overlay/etc/init.d/hidden-service">/etc/init.d/hidden-service</a></li>
 </ul>



More information about the tor-commits mailing list