summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-12 15:36:50 +0200
committerFlorian Dold <florian@dold.me>2023-04-12 15:36:50 +0200
commitbaa1ef996958355f7713bc09e21728e1c931bf7e (patch)
treefc96a367665d7ca99f81796a8ed7aa153e942506
parent7870c134928ffc971ecc723e20b22ad492d7f2c4 (diff)
downloaddeployment-baa1ef996958355f7713bc09e21728e1c931bf7e.tar.gz
deployment-baa1ef996958355f7713bc09e21728e1c931bf7e.tar.bz2
deployment-baa1ef996958355f7713bc09e21728e1c931bf7e.zip
netzbon: shellcheck
-rw-r--r--netzbon/.shellcheckrc1
-rw-r--r--netzbon/config/internal.conf0
-rw-r--r--netzbon/config/user.conf0
-rwxr-xr-xnetzbon/config_launch_libeufin.sh2
-rwxr-xr-xnetzbon/functions.sh3
-rwxr-xr-xnetzbon/setup-exchange.sh1
6 files changed, 7 insertions, 0 deletions
diff --git a/netzbon/.shellcheckrc b/netzbon/.shellcheckrc
new file mode 100644
index 0000000..e170f39
--- /dev/null
+++ b/netzbon/.shellcheckrc
@@ -0,0 +1 @@
+disable=SC2018,SC2019
diff --git a/netzbon/config/internal.conf b/netzbon/config/internal.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/netzbon/config/internal.conf
diff --git a/netzbon/config/user.conf b/netzbon/config/user.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/netzbon/config/user.conf
diff --git a/netzbon/config_launch_libeufin.sh b/netzbon/config_launch_libeufin.sh
index 09bf077..d00e631 100755
--- a/netzbon/config_launch_libeufin.sh
+++ b/netzbon/config_launch_libeufin.sh
@@ -65,6 +65,7 @@ echo "LIBEUFIN_NEXUS_USERNAME=\"${LIBEUFIN_NEXUS_USERNAME}\"" >>config/internal.
# Load configuration with
# LIBEUFIN_NEXUS_DB_CONNECTION and
# LIBEUFIN_NEXUS_PORT
+# shellcheck disable=SC1091
source /etc/libeufin/nexus.env
export LIBEUFIN_NEXUS_DB_CONNECTION
@@ -79,6 +80,7 @@ export LIBEUFIN_NEXUS_URL="http://localhost:${LIBEUFIN_NEXUS_PORT}"
# Load configuration with
# LIBEUFIN_SANDBOX_DB_CONNECTION and
# LIBEUFIN_SANDBOX_PORT
+# shellcheck disable=SC1091
. /etc/libeufin/sandbox.env
export LIBEUFIN_SANDBOX_DB_CONNECTION
diff --git a/netzbon/functions.sh b/netzbon/functions.sh
index 3938aca..753d846 100755
--- a/netzbon/functions.sh
+++ b/netzbon/functions.sh
@@ -18,7 +18,10 @@ function check_user() {
# status if distro not supported.
function detect_distro() {
unset DISTRO
+ # shellcheck disable=SC2034
uname -a | grep Ubuntu >/dev/null && DISTRO=ubuntu && return 0
+ # shellcheck disable=SC2034
uname -a | grep Debian >/dev/null && DISTRO=debian && return 0
+ echo "Unsupported distro, should be either ubuntu or debian" >&2
return 1
}
diff --git a/netzbon/setup-exchange.sh b/netzbon/setup-exchange.sh
index 69e0238..ab7da70 100755
--- a/netzbon/setup-exchange.sh
+++ b/netzbon/setup-exchange.sh
@@ -15,6 +15,7 @@ notify_err() {
trap '(exit 130)' INT
trap '(exit 143)' TERM
trap notify_err ERR
+# shellcheck disable=SC2154
trap 'rc=$?; notify_exit $rc; exit $rc' EXIT
# End of error handling setup