pull image on install, remove it when qpkg is uninstalled
This commit is contained in:
@@ -108,18 +108,22 @@ QPKG_NAME="RoonServer"
|
||||
|
||||
#PKG_PRE_REMOVE="{
|
||||
#}"
|
||||
#
|
||||
#PKG_MAIN_REMOVE="{
|
||||
#}"
|
||||
#
|
||||
|
||||
PKG_MAIN_REMOVE="{
|
||||
|
||||
## Remove Roon Servers docker image
|
||||
CS_DIR=`$CMD_GETCFG "container-station" Install_Path -f SYS_QPKG_CONFIG_FILE`
|
||||
$CS_DIR/bin/system-docker image rm 'ghcr.io/roonlabs/roonserver:latest'
|
||||
|
||||
}"
|
||||
|
||||
PKG_POST_REMOVE="{
|
||||
|
||||
## Remove symlink of web interface, if it still exist
|
||||
|
||||
RoonSymlink="/home/httpd/cgi-bin/qpkg/RoonServer"
|
||||
if [ -L $RoonSymlink ]; then
|
||||
"${CMD_RM}" "${RoonSymlink}"
|
||||
fi
|
||||
|
||||
}"
|
||||
#
|
||||
######################################################################
|
||||
@@ -141,24 +145,25 @@ pkg_init(){
|
||||
# Define any package specific operations that shall be performed when
|
||||
# the package is installed.
|
||||
######################################################################
|
||||
|
||||
pkg_pre_install(){
|
||||
}
|
||||
#
|
||||
#pkg_pre_install(){
|
||||
#}
|
||||
|
||||
pkg_install(){
|
||||
## Creating required folders and setting permissions
|
||||
"${CMD_MKDIR}" -m 777 "${SYS_QPKG_DIR}"/id
|
||||
|
||||
CS_DIR=`$CMD_GETCFG "container-station" Install_Path -f SYS_QPKG_CONFIG_FILE`
|
||||
|
||||
# Pull Roon Server docker image, so the first qpkg launch will take less time.
|
||||
$CS_DIR/bin/system-docker pull 'ghcr.io/roonlabs/roonserver:latest'
|
||||
|
||||
}
|
||||
|
||||
pkg_post_install(){
|
||||
# Checking if required directories exist
|
||||
[ -d "${SYS_QPKG_DIR}/tmp" ] || "${CMD_MKDIR}" -m 777 "${SYS_QPKG_DIR}/tmp"
|
||||
[ -d "${SYS_QPKG_DIR}/id" ] || "${CMD_MKDIR}" -m 777 "${SYS_QPKG_DIR}/id"
|
||||
|
||||
|
||||
|
||||
"${CMD_SETCFG}" "${QPKG_NAME}" options "" -f "${SYS_QPKG_CONFIG_FILE}"
|
||||
|
||||
|
||||
"${CMD_SETCFG}" "${QPKG_NAME}" Force_Visible 1 -f "${SYS_QPKG_CONFIG_FILE}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user