OpenSecurity/bin/terminate_client_tray.pyw
author Oliver Maurhart <oliver.maurhart@ait.ac.at>
Mon, 29 Sep 2014 12:46:51 +0200
changeset 226 107dc235508f
child 240 d7ef04254e9c
permissions -rw-r--r--
added tray client termination support for uninstall
     1 # -*- coding: utf-8 -*-
     2 
     3 # ------------------------------------------------------------
     4 # terminate the client tray
     5 # 
     6 # Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
     7 #
     8 # Copyright (C) 2014 AIT Austrian Institute of Technology
     9 # AIT Austrian Institute of Technology GmbH
    10 # Donau-City-Strasse 1 | 1220 Vienna | Austria
    11 # http://www.ait.ac.at
    12 #
    13 # This program is free software; you can redistribute it and/or
    14 # modify it under the terms of the GNU General Public License
    15 # as published by the Free Software Foundation version 2.
    16 # 
    17 # This program is distributed in the hope that it will be useful,
    18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20 # GNU General Public License for more details.
    21 # 
    22 # You should have received a copy of the GNU General Public License
    23 # along with this program; if not, write to the Free Software
    24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, 
    25 # Boston, MA  02110-1301, USA.
    26 # ------------------------------------------------------------
    27 
    28 
    29 # ------------------------------------------------------------
    30 # imports
    31 
    32 import urllib2
    33 
    34 
    35 # ------------------------------------------------------------
    36 # code
    37 
    38 
    39 # start
    40 if __name__ == "__main__":
    41 
    42     try:
    43 
    44         # TODO: HARDCODED ADDRESS OF OPENSECURITY CLIENT TRAY
    45         browsing_vm = urllib2.urlopen('http://127.0.0.1:8090/quit').readline()
    46         print('Called http://127.0.0.1:8090/quit')
    47         
    48     except Exception as e:
    49         print('Failed: %s' % (e.message))
    50         
    51