From 01cc972d837a505e0079063d89f76e835efeb1f2 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 2 Apr 2020 00:31:57 +0200 Subject: [PATCH] rename lib/config to lib/includes --- bkctld | 2 +- lib/bkctld-check | 2 +- lib/bkctld-firewall | 2 +- lib/bkctld-help | 2 +- lib/bkctld-inc | 2 +- lib/bkctld-init | 2 +- lib/bkctld-ip | 2 +- lib/bkctld-is-on | 2 +- lib/bkctld-key | 2 +- lib/bkctld-list | 2 +- lib/bkctld-port | 2 +- lib/bkctld-reload | 2 +- lib/bkctld-remove | 2 +- lib/bkctld-restart | 2 +- lib/bkctld-rm | 2 +- lib/bkctld-start | 2 +- lib/bkctld-stats | 2 +- lib/bkctld-status | 2 +- lib/bkctld-stop | 2 +- lib/bkctld-sync | 2 +- lib/bkctld-update | 2 +- lib/{config => includes} | 0 22 files changed, 21 insertions(+), 21 deletions(-) rename lib/{config => includes} (100%) diff --git a/bkctld b/bkctld index d8d2b52..4fc0e4d 100755 --- a/bkctld +++ b/bkctld @@ -15,7 +15,7 @@ set -u [ -d './lib' ] && LIBDIR='lib' [ -d '/usr/lib/bkctld' ] && LIBDIR='/usr/lib/bkctld' # shellcheck source=lib/config -. "${LIBDIR}/config" +. "${LIBDIR}/includes" subcommand="${1:-}" jail="${2:-}" diff --git a/lib/bkctld-check b/lib/bkctld-check index e6be6f3..db015b7 100755 --- a/lib/bkctld-check +++ b/lib/bkctld-check @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" return=0 nb_crit=0 diff --git a/lib/bkctld-firewall b/lib/bkctld-firewall index be7540e..56fa4c8 100755 --- a/lib/bkctld-firewall +++ b/lib/bkctld-firewall @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-help b/lib/bkctld-help index 7c2243d..b8743e2 100755 --- a/lib/bkctld-help +++ b/lib/bkctld-help @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" cat < [options] diff --git a/lib/bkctld-inc b/lib/bkctld-inc index 733953e..aaf3c25 100755 --- a/lib/bkctld-inc +++ b/lib/bkctld-inc @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" create_inc_btrfs() { jail_name=$1 diff --git a/lib/bkctld-init b/lib/bkctld-init index bf54d21..4892760 100755 --- a/lib/bkctld-init +++ b/lib/bkctld-init @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail_name="${1:-}" if [ -z "${jail_name}" ]; then diff --git a/lib/bkctld-ip b/lib/bkctld-ip index c4a5694..ff6665f 100755 --- a/lib/bkctld-ip +++ b/lib/bkctld-ip @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" ip="${2:-}" diff --git a/lib/bkctld-is-on b/lib/bkctld-is-on index 3061dc8..99e625c 100755 --- a/lib/bkctld-is-on +++ b/lib/bkctld-is-on @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-key b/lib/bkctld-key index f9bf696..5bef87d 100755 --- a/lib/bkctld-key +++ b/lib/bkctld-key @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" keyfile="${2:-}" diff --git a/lib/bkctld-list b/lib/bkctld-list index 8ceba56..f95a15b 100755 --- a/lib/bkctld-list +++ b/lib/bkctld-list @@ -7,7 +7,7 @@ set -eu # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" [ -d "${JAILDIR}" ] || exit 0 #TODO: try if this command works the same : diff --git a/lib/bkctld-port b/lib/bkctld-port index 5e4a223..f182a83 100755 --- a/lib/bkctld-port +++ b/lib/bkctld-port @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" port="${2:-}" diff --git a/lib/bkctld-reload b/lib/bkctld-reload index 6d9b70b..18b528e 100755 --- a/lib/bkctld-reload +++ b/lib/bkctld-reload @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-remove b/lib/bkctld-remove index 5df0091..b886aa1 100755 --- a/lib/bkctld-remove +++ b/lib/bkctld-remove @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-restart b/lib/bkctld-restart index 3cc7afc..985d3d7 100755 --- a/lib/bkctld-restart +++ b/lib/bkctld-restart @@ -7,7 +7,7 @@ set -eu # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-rm b/lib/bkctld-rm index 26d5f82..ee1a852 100755 --- a/lib/bkctld-rm +++ b/lib/bkctld-rm @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" relative_date() { format=$(echo $1 | cut -d'.' -f1) diff --git a/lib/bkctld-start b/lib/bkctld-start index daa2eba..7d960aa 100755 --- a/lib/bkctld-start +++ b/lib/bkctld-start @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-stats b/lib/bkctld-stats index 5660ba3..122b773 100755 --- a/lib/bkctld-stats +++ b/lib/bkctld-stats @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" mkdir -p "${INDEX_DIR}" lsof "${IDX_FILE}" >/dev/null 2>&1 || nohup sh -s -- </dev/null 2>&1 & diff --git a/lib/bkctld-status b/lib/bkctld-status index 7578608..034a488 100755 --- a/lib/bkctld-status +++ b/lib/bkctld-status @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-stop b/lib/bkctld-stop index 75ab44c..3d3fc99 100755 --- a/lib/bkctld-stop +++ b/lib/bkctld-stop @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-sync b/lib/bkctld-sync index bd612be..68c85b9 100755 --- a/lib/bkctld-sync +++ b/lib/bkctld-sync @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail="${1:-}" if [ ! -n "${jail}" ]; then diff --git a/lib/bkctld-update b/lib/bkctld-update index c803bb7..09b2bf5 100755 --- a/lib/bkctld-update +++ b/lib/bkctld-update @@ -5,7 +5,7 @@ # # shellcheck source=./config -LIBDIR="$(dirname $0)" && . "${LIBDIR}/config" +LIBDIR="$(dirname $0)" && . "${LIBDIR}/includes" jail_name="${1:-}" if [ ! -n "${jail_name}" ]; then diff --git a/lib/config b/lib/includes similarity index 100% rename from lib/config rename to lib/includes