restructuring, removed unneccessary options from web ui

This commit is contained in:
jt-chris
2026-04-12 03:06:36 +02:00
parent 615cf26bdd
commit cdc4554731
22 changed files with 129 additions and 332 deletions

View File

@@ -6,7 +6,16 @@ QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`
QCS_NAME="container-station"
QCS_QPKG_DIR=$(/sbin/getcfg $QCS_NAME Install_Path -f $CONF)
DOCKER_CMD=$QCS_QPKG_DIR/bin/system-docker
CONT_NAME="qnap-roonserver"
CONTAINER_NAME=roonserver
COMPOSE_YML_DIR=$QPKG_ROOT/docker/compose/
COMPOSE_FILES="\
-f $COMPOSE_YML_DIR/roonserver.yml \
-f $COMPOSE_YML_DIR/platform_specific.yml \
-f $COMPOSE_YML_DIR/smb_cifs_support.yml \
-f $COMPOSE_YML_DIR/audio.yml \
-f $COMPOSE_YML_DIR/audio_usb.yml \
-f $COMPOSE_YML_DIR/audio_hdmi.yml"
WEB_PATH="/home/httpd"
WEBUI=$(/sbin/getcfg $QPKG_NAME webUI -f ${CONF});
@@ -87,12 +96,14 @@ start_RoonServer () {
export QNAP_SERIAL
export QNAP_QTS_VER
export CONTAINER_NAME
## Creating required directories, if they do not exist
[ -d "$ROON_ID_DIR" ] || mkdir "$ROON_ID_DIR"
[ -d "$ROON_TMP_DIR" ] || mkdir "$ROON_TMP_DIR"
${DOCKER_CMD} compose -f $QPKG_ROOT/docker/docker-compose.yml -f $QPKG_ROOT/docker/qnap.yml up -d
${DOCKER_CMD} compose ${COMPOSE_FILES} up -d
fi
}
@@ -113,7 +124,8 @@ case "$1" in
echolog "$QPKG_NAME is disabled."
exit 1
fi
if [ -z `$DOCKER_CMD compose ps -q $CONT_NAME` ] || [ -z `$DOCKER_CMD ps -q --no-trunc | grep $($DOCKER_CMD compose ps -q $CONT_NAME)` ]; then
if [ ! "$(${DOCKER_CMD} ps -a -q -f name=$CONTAINER_NAME)" ]; then
echo "not running"
start_daemon
else
echolog "${QPKG_NAME} is already running with..."
@@ -121,18 +133,18 @@ case "$1" in
;;
stop)
if [ -z `$DOCKER_CMD compose ps -q $CONT_NAME` ] || [ -z `$DOCKER_CMD ps -q --no-trunc | grep $($DOCKER_CMD compose ps -q $CONT_NAME)` ]; then
if [ ! "$(${DOCKER_CMD} ps -a -q -f name=$CONTAINER_NAME)" ]; then
echolog "${QPKG_NAME} is not running."
else
echolog "Stopping RoonServer..."
${DOCKER_CMD} compose -f $QPKG_ROOT/docker/docker-compose.yml -f $QPKG_ROOT/docker/qnap.yml down
export CONTAINER_NAME
${DOCKER_CMD} compose ${COMPOSE_FILES} down
if [[ $2 != "keepwebalive" ]]; then
rm -rf "${QPKG_ROOT}/web/tmp"/*
rm "${WEB_PATH}${WEBUI}"
fi
echolog "RoonServer has been stopped."
fi
${DOCKER_CMD} compose -f $QPKG_ROOT/docker/docker-compose.yml -f $QPKG_ROOT/docker/qnap.yml down
;;
restart)