🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-09-07 00:44:33 -04:00
parent 35b08be08b
commit ca8c0a4f0f
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F

View File

@ -39,6 +39,7 @@ __find() { ls -A "$*" 2>/dev/null; }
[ -n "$SHOW_RAW" ] || printf_color() { echo -e '\t\t'${2:-}"${1:-}${NC}"; }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__exec_bash() {
[ "$1" = "" ] && shift 1
local cmd="${*:-/bin/bash}"
local exitCode=0
echo "Executing command: $cmd"
@ -94,10 +95,6 @@ fi
[ -f "/etc/.env.sh" ] && rm -Rf "/etc/.env.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional commands
if [ ! -L "/etc/nginx/http.d/default.conf" ]; then
ln -sf "/config/nginx/navidrome.conf" "/etc/nginx/http.d/default.conf"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -d "/data/mpd" ] || mkdir -p "/data/mpd"
[ -d "/data/music" ] || mkdir -p "/data/music"
[ -d "/data/navidrome" ] || mkdir -p "/data/navidrome"
@ -105,12 +102,16 @@ fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -d "/config/mpd" ] || mkdir -p "/config/mpd"
[ -d "/config/nginx" ] || mkdir -p "/config/nginx"
[ -d "/config/navidrome" ] || mkdir -p "/navidrome/mpd"
[ -d "/config/navidrome" ] || mkdir -p "/config/navidrome"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -f "/config/mpd/mpd.conf" ] || cp -Rf "/etc/mpd.conf" "/config/mpd/mpd.conf"
[ -f "/config/nginx/navidrome.conf" ] || cp -Rf "/etc/nginx/navidrome.conf" "/config/navidrome.conf"
[ -f "/config/navidrome/navidrome.toml" ] || cp -Rf "/etc/navidrome/navidrome.toml" "/config/navidrome/navidrome.toml"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ ! -L "/etc/nginx/http.d/default.conf" ] && [ -f "/config/nginx/navidrome.conf" ]; then
ln -sf "/config/nginx/navidrome.conf" "/etc/nginx/http.d/default.conf"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ! pgrep mpd &>/dev/null; then
[ -f "/data/mpd/mpd.pid" ] && rm -Rf "/data/mpd/mpd.pid"
fi
@ -142,10 +143,10 @@ healthcheck) # Docker healthcheck
*) # Execute primary command
if [ $# -eq 0 ]; then
nginx
mpd /config/mpd/mpd.conf
navidrome --configfile /config/navidrome/navidrome.toml
mpd "/config/mpd/mpd.conf"
navidrome --configfile "/config/navidrome/navidrome.toml"
else
__exec_bash "/bin/bash"
__exec_bash "$@"
fi
exitCode=$?
;;