diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-09 05:45:41 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-09 05:45:41 +0000 |
commit | 911538725ac2c167ebabdb5bb64da954831181aa (patch) | |
tree | 6836bbda7f7cac3f76af5880c7cd197a6cb84c53 | |
parent | ef6bdd6c1e5e890fd34fcc6e37b1a3a2b313fa8b (diff) | |
download | tor-911538725ac2c167ebabdb5bb64da954831181aa.tar.gz tor-911538725ac2c167ebabdb5bb64da954831181aa.zip |
a tor-control patch to do setconf too
svn:r2725
-rwxr-xr-x | contrib/tor-control.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/tor-control.py b/contrib/tor-control.py index e11d98e1c9..66c43b32ff 100755 --- a/contrib/tor-control.py +++ b/contrib/tor-control.py @@ -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 |