-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_mod.sh
executable file
·32 lines (27 loc) · 1.1 KB
/
docker_mod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# shellcheck disable=SC2034
#########################################################################################################################
#### Make sure all volumes are mounted
if [[ -n "$container" || "$INCONTAINER" == "true" ]]; then
[[ "$DEBUG" == "true" ]] && echo "### DEBUG Container detected"
echo ">>> Container variables auto settings"
mounts=(/audible_history /status_file /audible_dl /audiobooks_dest /BALD/myconfig /BALD/tmp /root/.audible)
for dir in "${mounts[@]}"; do
grep -q "$dir" /proc/mounts || { echo "=== ERROR: Missing '$dir'"; exit 2; }
done
unset HIST_LIB_DIR
unset STATUS_FILE
unset DOWNLOAD_DIR
unset DEST_BASE_DIR
unset DEBUG_USEAAXSAMPLE
unset DEBUG_USEAAXCSAMPLE
declare -r HIST_LIB_DIR="/audible_history"
declare -r STATUS_FILE="/status_file"
declare -r DOWNLOAD_DIR="/audible_dl"
declare -r DEST_BASE_DIR="/audiobooks_dest"
declare -r DEBUG_USEAAXSAMPLE="sample.aax"
declare -r DEBUG_USEAAXCSAMPLE="sample.aaxc"
METADATA_TIKA=tika-app-2.9.2.jar
else
[[ "$DEBUG" == "true" ]] && echo "### DEBUG Not in container"
fi