diff options
author | Karl Palsson <karlp@etactica.com> | 2020-02-25 16:23:29 +0000 |
---|---|---|
committer | Karl Palsson <karlp@etactica.com> | 2020-02-26 11:21:53 +0000 |
commit | 0798a11fadfe3ee966a422d6748793d30e3bfbb1 (patch) | |
tree | 117103b2593281c0b715519c3b7a8a768d6160b4 /net/pagekitec/files | |
parent | 88fb4ac6b7f861fe6f83979917d218f565bb9cad (diff) |
pagekite: add simple websockets and update syntax
Syntax now matches preferred upstream style.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'net/pagekitec/files')
-rwxr-xr-x | net/pagekitec/files/etc/init.d/pagekitec | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/pagekitec/files/etc/init.d/pagekitec b/net/pagekitec/files/etc/init.d/pagekitec index 56dab0f6a..71ea238b5 100755 --- a/net/pagekitec/files/etc/init.d/pagekitec +++ b/net/pagekitec/files/etc/init.d/pagekitec @@ -6,7 +6,7 @@ USE_PROCD=1 add_instance() { local cfg="$1" - local kitename kitesecret simple_http simple_ssh static + local kitename kitesecret simple_http simple_ssh simple_ws static config_get kitename "$cfg" kitename config_get kitesecret "$cfg" kitesecret [ -z "$kitename" -o -z "$kitesecret" ] && { @@ -15,14 +15,16 @@ add_instance() { } config_get_bool simple_http "$cfg" simple_http 0 config_get_bool simple_ssh "$cfg" simple_ssh 0 + config_get simple_ws "$cfg" simple_ws 0 config_get_bool static "$cfg" static 0 procd_open_instance procd_set_param command $APP procd_append_param command -s [ $static -eq 1 ] && procd_append_param command -S - [ $simple_http -eq 1 ] && procd_append_param command 80 http $kitename 80 $kitesecret - [ $simple_ssh -eq 1 ] && procd_append_param command 22 raw $kitename 443 $kitesecret + [ $simple_http -eq 1 ] && procd_append_param command 80 http $kitename 0 $kitesecret + [ $simple_ssh -eq 1 ] && procd_append_param command 22 raw-22 $kitename 0 $kitesecret + [ $simple_ws -gt 0 ] && procd_append_param command $simple_ws websocket-$simple_ws $kitename 0 $kitesecret procd_close_instance } |