1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-08 16:58:31 +03:00

Thistation

This commit is contained in:
Adolfo Gómez García 2017-06-05 09:55:12 +02:00
parent 808c715710
commit fe18faa863
8 changed files with 35 additions and 5 deletions

View File

@ -117,7 +117,7 @@ if __name__ == "__main__":
ui.message('UDS Client', 'UDS Client Version {}'.format(VERSION))
sys.exit(1)
rest = RestRequest('{}://{}/rest/client'.format(['http', 'https'][ssl], host))
rest = RestRequest(host, ssl)
logger.debug('Setting request URL to {}'.format(rest.restApiUrl))
# Main requests part

View File

@ -50,9 +50,12 @@ class RestRequest(object):
restApiUrl = ''
def __init__(self, restURL): # parent not used
def __init__(self, host, ssl=True): # parent not used
super(RestRequest, self).__init__()
self.restApiUrl = restURL
self.host = host
self.ssl = ssl
self.restApiUrl = RestRequest('{}://{}/rest/client'.format(['http', 'https'][ssl], host))
def get(self, url, params=None):
url = self.restApiUrl + url

View File

@ -0,0 +1,4 @@
#!/bin/sh
cd /lib/UDSClient
exec python UDSClient.pyc $@

View File

@ -1,2 +1,2 @@
lib
src

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=UDSClient
Comment=UDS Helper
Keywords=uds;client;vdi;
Exec=/bin/udsclient %u
Icon=help-browser
StartupNotify=true
Terminal=false
Type=Application
Categories=Utility;
MimeType=x-scheme-handler/uds;x-scheme-handler/udss;

View File

@ -0,0 +1,4 @@
#!/bin/sh
cd /lib/UDSClient
exec python UDSClient.pyc $@

View File

@ -1,5 +1,13 @@
#!/bin/bash
#!/bin/sh
pip install paramiko requests six
rm -rf lib
mkdir -p lib/python2.7/site-packages
for a in requests paramiko pyasn1 cryptography packaging idna asn1crypto six enum ipaddress cffi ; do cp -r /usr/lib/python2.7/site-packages/$a* lib/python2.7/site-packages/; done
cp src/udsclient bin
chmod 755 bin/udsclient
mkdir lib/UDSClient
cp src/UDSClient.py lib/UDSClient
chmod 755 lib/UDSClient/UDSClient.py
cp -r src/uds lib/UDSClient
mkdir lib/applications
cp UDSClient.desktop lib/applications