forked from GhostWriters/DockSTARTer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenable_app.sh
More file actions
28 lines (26 loc) · 951 Bytes
/
Copy pathenable_app.sh
File metadata and controls
28 lines (26 loc) · 951 Bytes
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
#!/usr/bin/env bash
set -Eeuo pipefail
IFS=$'\n\t'
enable_app() {
# Enable the list of apps given. Apps will be seperate arguments and/or seperated by spaces
local AppList
AppList="$(xargs -n 1 <<< "$*")"
for APPNAME in ${AppList^^}; do
local AppName
AppName="$(run_script app_nicename "${APPNAME}")"
if run_script 'app_is_builtin' "${APPNAME}"; then
EnabledVar="${APPNAME}__ENABLED"
info "Enabling application '${C["App"]}${AppName}${NC}'"
notice "Setting variable in ${C["File"]}${COMPOSE_ENV}${NC}:"
notice " ${C["Var"]}${EnabledVar}='true'${NC}"
run_script 'env_set' "${EnabledVar}" true
else
warn "Application '${C["App"]}${AppName}${NC}' does not exist."
fi
done
}
test_enable_app() {
#run_script 'enable_app' watchtower "samba radarr"
#cat "${COMPOSE_ENV}"
warn "CI does not test enable_app."
}