Revert to SIGHUP for testing
This commit is contained in:
@@ -23,7 +23,7 @@ $ installJRMC --help
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC without minimum dependency version requirements
|
Build/install MC without minimum dependency version requirements
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Build or install a specific MC version, ex. "31.0.12" (default: latest version)
|
Build or install a specific MC version, ex. "31.0.13" (default: latest version)
|
||||||
--arch ARCH
|
--arch ARCH
|
||||||
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
||||||
--outputdir PATH
|
--outputdir PATH
|
||||||
@@ -112,9 +112,9 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
|||||||
|
|
||||||
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
|
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
|
||||||
|
|
||||||
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.12`
|
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.13`
|
||||||
|
|
||||||
Build and install an MC 31.0.12 comptability RPM locally and activate it using the `/path/to/license.mjr`
|
Build and install an MC 31.0.13 comptability RPM locally and activate it using the `/path/to/license.mjr`
|
||||||
|
|
||||||
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $ installJRMC --help
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC without minimum dependency version requirements
|
Build/install MC without minimum dependency version requirements
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Build or install a specific MC version, ex. "31.0.12"
|
Build or install a specific MC version, ex. "31.0.13"
|
||||||
--arch ARCH
|
--arch ARCH
|
||||||
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
||||||
--outputdir PATH
|
--outputdir PATH
|
||||||
@@ -106,8 +106,8 @@ Install the latest version of MC from the best available repository.
|
|||||||
Install a more widely-compatible version of the latest MC version.
|
Install a more widely-compatible version of the latest MC version.
|
||||||
[code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code]
|
[code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code]
|
||||||
Install MC from the repository and start/enable jriver-mediacenter.service as a user service.
|
Install MC from the repository and start/enable jriver-mediacenter.service as a user service.
|
||||||
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.12[/code]
|
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 31.0.13[/code]
|
||||||
Build and install an MC 31.0.12 comptability RPM locally and activate it using the /path/to/license.mjr
|
Build and install an MC 31.0.13 comptability RPM locally and activate it using the /path/to/license.mjr
|
||||||
[code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
[code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
||||||
Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user.
|
Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user.
|
||||||
[code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
[code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
|
||||||
|
|||||||
19
installJRMC
19
installJRMC
@@ -19,7 +19,7 @@ shopt -s extglob
|
|||||||
declare -g SCRIPTVERSION="1.0-dev"
|
declare -g SCRIPTVERSION="1.0-dev"
|
||||||
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,80.0.html" # MC31
|
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,80.0.html" # MC31
|
||||||
declare -g DEBIANBASE="bullseye"
|
declare -g DEBIANBASE="bullseye"
|
||||||
declare -g MC_VERSION_HARDCODE="31.0.12"
|
declare -g MC_VERSION_HARDCODE="31.0.13"
|
||||||
|
|
||||||
printHelp() {
|
printHelp() {
|
||||||
debug "Running: ${FUNCNAME[0]}"
|
debug "Running: ${FUNCNAME[0]}"
|
||||||
@@ -40,7 +40,7 @@ printHelp() {
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC locally without minimum dependency version requirements
|
Build/install MC locally without minimum dependency version requirements
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Specify the MC version, ex. "31.0.12" (default: latest version)
|
Specify the MC version, ex. "31.0.13" (default: latest version)
|
||||||
--arch VERSION
|
--arch VERSION
|
||||||
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
||||||
--outputdir PATH
|
--outputdir PATH
|
||||||
@@ -404,7 +404,9 @@ setMCVersion() {
|
|||||||
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
||||||
MC_VERSION_SOURCE="user input"
|
MC_VERSION_SOURCE="user input"
|
||||||
# Containerized package manager
|
# Containerized package manager
|
||||||
elif installPackage --silent buildah &&
|
else
|
||||||
|
echo "Determining latest MC version"
|
||||||
|
if installPackage --silent buildah &&
|
||||||
hash buildah &>/dev/null &&
|
hash buildah &>/dev/null &&
|
||||||
cnt=$(buildah from --quiet debian:$DEBIANBASE-slim) &>/dev/null &&
|
cnt=$(buildah from --quiet debian:$DEBIANBASE-slim) &>/dev/null &&
|
||||||
buildah run "$cnt" -- bash -c \
|
buildah run "$cnt" -- bash -c \
|
||||||
@@ -414,7 +416,7 @@ setMCVersion() {
|
|||||||
MC_VERSION=$(buildah run "$cnt" -- apt-cache policy mediacenter?? | grep Candidate | awk '{print $2}' | sort -V | tail -n1) &>/dev/null &&
|
MC_VERSION=$(buildah run "$cnt" -- apt-cache policy mediacenter?? | grep Candidate | awk '{print $2}' | sort -V | tail -n1) &>/dev/null &&
|
||||||
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
||||||
MC_VERSION_SOURCE="containerized package manager"
|
MC_VERSION_SOURCE="containerized package manager"
|
||||||
buildah rm "$cnt" &>/dev/null
|
execute buildah rm "$cnt"
|
||||||
# Webscrape
|
# Webscrape
|
||||||
elif installPackage wget && MC_VERSION=$(wget -qO- "$BOARDURL" | grep -o "[0-9][0-9]\.[0-9]\.[0-9]\+" | head -n 1) &&
|
elif installPackage wget && MC_VERSION=$(wget -qO- "$BOARDURL" | grep -o "[0-9][0-9]\.[0-9]\.[0-9]\+" | head -n 1) &&
|
||||||
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
[[ $MC_VERSION =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
||||||
@@ -425,6 +427,7 @@ setMCVersion() {
|
|||||||
MC_VERSION_SOURCE="hardcoded or MC_VERSION env"
|
MC_VERSION_SOURCE="hardcoded or MC_VERSION env"
|
||||||
err "Warning! Using hardcoded version number"
|
err "Warning! Using hardcoded version number"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
MC_MVERSION="${MC_VERSION%%.*}"
|
MC_MVERSION="${MC_VERSION%%.*}"
|
||||||
MC_PKG="mediacenter$MC_MVERSION"
|
MC_PKG="mediacenter$MC_MVERSION"
|
||||||
@@ -1302,8 +1305,8 @@ service_jriver-mediacenter() {
|
|||||||
Environment=DISPLAY=$DISPLAY
|
Environment=DISPLAY=$DISPLAY
|
||||||
Environment=XAUTHORITY=$XAUTHORITY
|
Environment=XAUTHORITY=$XAUTHORITY
|
||||||
ExecStart=/usr/bin/mediacenter$MC_MVERSION $*
|
ExecStart=/usr/bin/mediacenter$MC_MVERSION $*
|
||||||
ExecStop=$MC_STUB_TARGET /MCC 20007
|
KillMode=process
|
||||||
KillMode=none
|
KillSignal=SIGHUP
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
@@ -1780,14 +1783,14 @@ main() {
|
|||||||
if (( REPO_INSTALL_SWITCH )); then
|
if (( REPO_INSTALL_SWITCH )); then
|
||||||
echo "Installing JRiver Media Center from remote repository"
|
echo "Installing JRiver Media Center from remote repository"
|
||||||
if installMCFromRepo; then
|
if installMCFromRepo; then
|
||||||
echo "JRiver Media Center installed successfully from repo"
|
echo "JRiver Media Center installed successfully from remote repository"
|
||||||
symlinkCerts
|
symlinkCerts
|
||||||
migrateLibrary
|
migrateLibrary
|
||||||
restoreLicense
|
restoreLicense
|
||||||
openFirewall "jriver-mediacenter" "52100-52200/tcp" "1900/udp"
|
openFirewall "jriver-mediacenter" "52100-52200/tcp" "1900/udp"
|
||||||
disableCoW
|
disableCoW
|
||||||
else
|
else
|
||||||
err "JRiver Media Center installation from repo failed"
|
err "JRiver Media Center installation from remote repository failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user