Browse Source

Update

tags/v0.0.63
Peter Vivell 7 years ago
parent
commit
20f3ff3402
2 changed files with 4 additions and 5 deletions
  1. 2
    2
      html/js/streamplot.js
  2. 2
    3
      service/websockify.service

+ 2
- 2
html/js/streamplot.js View File

3
   url = url || [
3
   url = url || [
4
     location.protocol == 'https:' ? 'wss://' : 'ws://',
4
     location.protocol == 'https:' ? 'wss://' : 'ws://',
5
     location.hostname,
5
     location.hostname,
6
-    location.protocol == 'https:' ? ':443' : ':80',
6
+    location.protocol == 'https:' ? ':' + (location.port || 443) : ':' + (location.port || 80),
7
     '/data/stream.ws'
7
     '/data/stream.ws'
8
   ].join('');
8
   ].join('');
9
   var ctx = {
9
   var ctx = {
291
   var src = dataSrc([
291
   var src = dataSrc([
292
     location.protocol == 'https:' ? 'wss://' : 'ws://',
292
     location.protocol == 'https:' ? 'wss://' : 'ws://',
293
     location.hostname,
293
     location.hostname,
294
-    location.protocol == 'https:' ? ':443' : ':80',
294
+    location.protocol == 'https:' ? ':' + (localtion.port || 443) : ':' + (location.port || 80),
295
     ctx.src.stream
295
     ctx.src.stream
296
   ].join(''));
296
   ].join(''));
297
 
297
 

+ 2
- 3
service/websockify.service View File

3
 After=multi-user.target
3
 After=multi-user.target
4
 
4
 
5
 [Service]
5
 [Service]
6
-Type=forking
6
+Type=simple
7
 
7
 
8
 User=www-data
8
 User=www-data
9
 Group=www-data
9
 Group=www-data
14
 Environment=TARGET_PORT=5900
14
 Environment=TARGET_PORT=5900
15
 #EnvironmentFile=/etc/default/websockify
15
 #EnvironmentFile=/etc/default/websockify
16
 
16
 
17
-PIDFile=/var/run/websockify.pid
18
 PermissionsStartOnly=true
17
 PermissionsStartOnly=true
19
 ExecStartPre=/bin/sh -c '\
18
 ExecStartPre=/bin/sh -c '\
20
 	touch /var/run/websockify.pid; \
19
 	touch /var/run/websockify.pid; \
21
 	chown www-data:www-data /var/run/websockify.pid'
20
 	chown www-data:www-data /var/run/websockify.pid'
22
 WorkingDirectory=/tmp
21
 WorkingDirectory=/tmp
23
-ExecStart=/usr/bin/websockify --daemon --pid /var/run/websockify.pid \
22
+ExecStart=/usr/bin/websockify \
24
 	${LISTEN_HOST}:${LISTEN_PORT} \
23
 	${LISTEN_HOST}:${LISTEN_PORT} \
25
 	${TARGET_HOST}:${TARGET_PORT}
24
 	${TARGET_HOST}:${TARGET_PORT}
26
 
25
 

Loading…
Cancel
Save