diff options
author | James Meyer <james.meyer@operamail.com> | 2013-01-23 23:46:37 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-01-23 23:46:37 (GMT) |
commit | 5fd9752d7444750a3bb4222ed15c8ddf6db858fe (patch) | |
tree | 1cfbbb9549297619387b1300acc622fd479eea4e /abs/core/runit-scripts/runitscripts/services/cetonproxy | |
parent | 879fd1c6e6a0fc060866f810956b00be2d1792cf (diff) | |
download | linhes_pkgbuild-5fd9752d7444750a3bb4222ed15c8ddf6db858fe.zip linhes_pkgbuild-5fd9752d7444750a3bb4222ed15c8ddf6db858fe.tar.gz linhes_pkgbuild-5fd9752d7444750a3bb4222ed15c8ddf6db858fe.tar.bz2 |
runit-scripts: add cetonproxy or bridge service. Added infinitv_usb service.
refs #899
refs #898
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/cetonproxy')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/cetonproxy/finish | 2 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/cetonproxy/run | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/cetonproxy/finish b/abs/core/runit-scripts/runitscripts/services/cetonproxy/finish new file mode 100755 index 0000000..4d4d6da --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/cetonproxy/finish @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/killall -9 balance diff --git a/abs/core/runit-scripts/runitscripts/services/cetonproxy/run b/abs/core/runit-scripts/runitscripts/services/cetonproxy/run new file mode 100755 index 0000000..c8c7fcf --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/cetonproxy/run @@ -0,0 +1,25 @@ +#!/bin/bash +exec 2>&1 +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +stat_runit "Starting Ceton bridge" +pid_string='' + +for i in `ls /etc/ceton_proxy.d/|sort -r` +do + . /etc/ceton_proxy.d/$i + #forcing foreground and then running with & is to capture the pid + balance -f $port $ip:80 >/dev/null & + stat_runit " proxy $ip on port $port" + pid=$! + pid_string="$pid_string $pid" +done + +if [ "x$pid_string" = "x" ] +then + sv stop cetonproxy +else + wait $pid_string +fi + |