mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
vpnbypass: README update, code cleanup
Signed-off-by: Stan Grishin <stangri@melmac.net> update Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
committed by
Paul Spooren
parent
281418cc41
commit
0daa9fb1dd
@@ -3,17 +3,27 @@
|
||||
# shellcheck disable=SC2039,SC1091,SC2086
|
||||
PKG_VERSION='dev-test'
|
||||
|
||||
export START=94
|
||||
export USE_PROCD=1
|
||||
# shellcheck disable=SC2034
|
||||
START=94
|
||||
# shellcheck disable=SC2034
|
||||
USE_PROCD=1
|
||||
|
||||
readonly _OK_='\033[0;32m\xe2\x9c\x93\033[0m'
|
||||
readonly _FAIL_='\033[0;31m\xe2\x9c\x97\033[0m'
|
||||
readonly __OK__='\033[0;32m[\xe2\x9c\x93]\033[0m'
|
||||
readonly __FAIL__='\033[0;31m[\xe2\x9c\x97]\033[0m'
|
||||
readonly __PASS__='\033[0;33m[-]\033[0m'
|
||||
readonly _ERROR_='\033[0;31mERROR\033[0m'
|
||||
# shellcheck disable=SC2034
|
||||
EXTRA_COMMANDS='version'
|
||||
version() { echo "$PKG_VERSION"; }
|
||||
|
||||
readonly __ERROR__='\033[0;31mERROR\033[0m'
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
serviceEnabled=0
|
||||
verbosity=2
|
||||
TID='200'
|
||||
IPSET='vpnbypass'
|
||||
FW_MARK='0x010000'
|
||||
FW_MASK='0xff0000'
|
||||
wan_if4=''
|
||||
wan_gw=''
|
||||
|
||||
export serviceEnabled verbosity=2 TID='200' IPSET='vpnbypass' FW_MARK='0x010000' FW_MASK='0xff0000' wan_if4 wan_gw
|
||||
readonly packageName='vpnbypass'
|
||||
readonly serviceName="$packageName $PKG_VERSION"
|
||||
readonly sharedMemoryOutput="/dev/shm/$packageName-output"
|
||||
@@ -122,6 +132,6 @@ service_triggers() {
|
||||
procd_add_reload_trigger 'firewall' 'openvpn' 'vpnbypass'
|
||||
procd_open_trigger
|
||||
for n in $ifaces; do procd_add_reload_interface_trigger "$n"; procd_add_interface_trigger "interface.*" "$n" /etc/init.d/vpnbypass reload; done;
|
||||
output "$serviceName monitoring interfaces: $ifaces $_OK_\\n"
|
||||
output "$serviceName monitoring interfaces: $ifaces\\n"
|
||||
procd_close_trigger
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user