]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
a tor-control patch to do setconf too
authorRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 05:45:41 +0000 (05:45 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 9 Nov 2004 05:45:41 +0000 (05:45 +0000)
svn:r2725

contrib/tor-control.py

index e11d98e1c9fe75081de00e06487206eedc834bb3..66c43b32ff28537e4cb41a591d938b77c0d2a990 100755 (executable)
@@ -52,12 +52,18 @@ def get_option(s,name):
   length,type,body = receive_message(s)
   return
 
+def set_option(s,msg):
+  s.sendall(pack_message(MSG_TYPE_SETCONF,msg))
+  length,type,body = receive_message(s)
+  return
+
 def do_main_loop(host,port):
   print "host is %s:%d"%(host,port)
   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   s.connect((host,port))
   authenticate(s)
   get_option(s,"nickname")
+  set_option(s,"runasdaemon 1")
 #  get_option(s,"DirFetchPostPeriod\n")
 
   return