Browse Source

Update

tags/v0.0.63
Peter Vivell 6 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,7 +3,7 @@ function dataSrc(url, config) {
3 3
   url = url || [
4 4
     location.protocol == 'https:' ? 'wss://' : 'ws://',
5 5
     location.hostname,
6
-    location.protocol == 'https:' ? ':443' : ':80',
6
+    location.protocol == 'https:' ? ':' + (location.port || 443) : ':' + (location.port || 80),
7 7
     '/data/stream.ws'
8 8
   ].join('');
9 9
   var ctx = {
@@ -291,7 +291,7 @@ function createGraph(id, ctx) {
291 291
   var src = dataSrc([
292 292
     location.protocol == 'https:' ? 'wss://' : 'ws://',
293 293
     location.hostname,
294
-    location.protocol == 'https:' ? ':443' : ':80',
294
+    location.protocol == 'https:' ? ':' + (localtion.port || 443) : ':' + (location.port || 80),
295 295
     ctx.src.stream
296 296
   ].join(''));
297 297
 

+ 2
- 3
service/websockify.service View File

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

Loading…
Cancel
Save