mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
pagekitec: add new package
From the package description: PageKite is a system for running publicly visible servers (generally web servers) on machines without a direct connection to the Internet, such as mobile devices or computers behind restrictive firewalls. PageKite works around NAT, firewalls and IP-address limitations by using a combination of tunnels and reverse proxies. This package provides an implementation of the PageKite Protocol in C, optimized for high-performance or embedded applications. Signed-off-by: Karl Palsson <karlp@tweak.net.au>
This commit is contained in:
committed by
Karl Palsson
parent
5f375b9131
commit
450577536f
@@ -0,0 +1 @@
|
||||
config pagekitec pagekitec
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Oct 2012, karlp@remake.is
|
||||
START=90
|
||||
APP=pagekitec
|
||||
USE_PROCD=1
|
||||
|
||||
add_instance() {
|
||||
local cfg="$1"
|
||||
local kitename kitesecret simple_http simple_ssh static
|
||||
config_get kitename "$cfg" kitename
|
||||
config_get kitesecret "$cfg" kitesecret
|
||||
[ -z "$kitename" -o -z "$kitesecret" ] && {
|
||||
echo "Both kitename and kitesecret must be specified"
|
||||
return 1
|
||||
}
|
||||
config_get_bool simple_http "$cfg" simple_http 0
|
||||
config_get_bool simple_ssh "$cfg" simple_ssh 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
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load pagekitec && config_foreach add_instance pagekitec
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "pagekitec"
|
||||
}
|
||||
Reference in New Issue
Block a user