summaryrefslogtreecommitdiff
path: root/sentinel-proxy/files/sentinel.sh
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2021-12-09 12:51:50 +0100
committerKarel Kočí <cynerd@email.cz>2021-12-09 12:51:50 +0100
commit45c300126e4a1f72eba94791f8da27e7082c2ec6 (patch)
tree338afb0530a7bd87e0b99937eee510fcb7540228 /sentinel-proxy/files/sentinel.sh
parent3df1aad296a94639ac36d3da87d52c27a26053a8 (diff)
downloadopenwrt-personal-pkgs-45c300126e4a1f72eba94791f8da27e7082c2ec6.tar.gz
openwrt-personal-pkgs-45c300126e4a1f72eba94791f8da27e7082c2ec6.tar.bz2
openwrt-personal-pkgs-45c300126e4a1f72eba94791f8da27e7082c2ec6.zip
sentinel-proxy: remove testing version
Diffstat (limited to 'sentinel-proxy/files/sentinel.sh')
-rwxr-xr-xsentinel-proxy/files/sentinel.sh47
1 files changed, 0 insertions, 47 deletions
diff --git a/sentinel-proxy/files/sentinel.sh b/sentinel-proxy/files/sentinel.sh
deleted file mode 100755
index 044832a..0000000
--- a/sentinel-proxy/files/sentinel.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-## sentinel.sh
-#
-# set of common functions intended to be sourced and reused in
-# sentinel-related scripts
-
-# source OpenWrt functions if not sourced yet
-command -v config_load > /dev/null || . /lib/functions.sh
-
-
-allowed_to_run() {
- local component_name="$1";
- agreed_with_eula "${component_name}" && component_enabled "${component_name}"
-}
-
-component_enabled() (
- local component_name="$1";
- config_load sentinel
-
- local enabled
- config_get_bool enabled "${component_name}" enabled "1"
- [ "$enabled" = "1" ] || {
- echo "Sentinel ${component_name} not enabled" >&2
- return 1
- }
-)
-
-agreed_with_eula() (
- local component_name="$1";
- config_load sentinel
-
- local agreed_eula_version
- config_get agreed_eula_version main agreed_with_eula_version "0"
- [ "$agreed_eula_version" -le "0" ] || return 0
-
- cat >&2 <<EOF
-Not agreed with EULA.
-
-EULA could be found at /usr/share/sentinel-eula/ and you can
-agree with it either in ReForis data collect tab or using
-uci config:
-uci set sentinel.main.agreed_with_eula_version=1 && uci commit
-
-EULA version may increase in time. See documentation for more details.
-EOF
- return 1
-)