Changeset - 023fce60e7bf
[Not reviewed]
default
0 1 0
Dennis Fink - 11 years ago 2013-11-18 21:24:01
dennis.fink@c3l.lu
updated ennstatus
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
Scripts/update_server.py
Show inline comments
 
@@ -26,10 +26,8 @@ def get_tor_status(name='tor'):
 
    try:
 
        pids = subprocess.check_output(['pidof', 'tor']).decode('utf-8')[:-1]
 
        pids = pids.split(' ')
 
        print(pids)
 
        pid_file = '.'.join([name, 'pid'])
 
        pid = open('/'.join(['/var', 'run', 'tor', pid_file])).readline()
 
        print(pid)
 
        pid = open('/'.join(['/var', 'run', 'tor', pid_file])).readline()[:-1]
 

	
 
        if str(pid) in pids:
 
            return "Online"
0 comments (0 inline, 0 general)