mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-08 16:58:31 +03:00
Thistation
This commit is contained in:
parent
808c715710
commit
fe18faa863
@ -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
|
||||
|
@ -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
|
||||
|
4
client/thin/src/udsclient
Normal file
4
client/thin/src/udsclient
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /lib/UDSClient
|
||||
exec python UDSClient.pyc $@
|
2
client/thin/thinstation/udsclient/.gitignore
vendored
2
client/thin/thinstation/udsclient/.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
lib
|
||||
|
||||
src
|
||||
|
11
client/thin/thinstation/udsclient/UDSClient.desktop
Normal file
11
client/thin/thinstation/udsclient/UDSClient.desktop
Normal 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;
|
4
client/thin/thinstation/udsclient/bin/udsclient
Executable file
4
client/thin/thinstation/udsclient/bin/udsclient
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /lib/UDSClient
|
||||
exec python UDSClient.pyc $@
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user