Compare commits
7 Commits
2cb935e336
...
e850fedf8a
| Author | SHA1 | Date | |
|---|---|---|---|
| e850fedf8a | |||
| 1803ddd055 | |||
| eae4a02cb4 | |||
| 82bb787b59 | |||
| a3d23a1d81 | |||
| 7edc328cf1 | |||
| 2296a43a31 |
27
installJRMC
27
installJRMC
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPTVERSION="1.0b15"
|
declare -g SCRIPTVERSION="1.0b16"
|
||||||
declare -g OUTPUTDIR="$PWD/output"
|
declare -g OUTPUTDIR="$PWD/output"
|
||||||
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
||||||
declare -g USER="${SUDO_USER:-$USER}"
|
declare -g USER="${SUDO_USER:-$USER}"
|
||||||
@@ -737,20 +737,31 @@ runCreaterepo() {
|
|||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Symlink certificates where JRiver Media Center expects them to be on Fedora/CentOS
|
# Symlink certificates if they do not exist in default location
|
||||||
#######################################
|
#######################################
|
||||||
symlinkCerts() {
|
symlinkCerts() {
|
||||||
debug "Running: ${FUNCNAME[0]}"
|
debug "Running: ${FUNCNAME[0]}"
|
||||||
|
|
||||||
if [[ ! -f /etc/ssl/certs/ca-certificates.crt &&
|
declare mc_cert_link="/usr/lib/jriver/Media Center $MVERSION/ca-certificates.crt"
|
||||||
-f /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ]]; then
|
declare target_cert
|
||||||
debug "ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt"
|
declare -a ln_cmd
|
||||||
if ! sudo ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
|
|
||||||
/etc/ssl/certs/ca-certificates.crt; then
|
target_cert=$(readlink -f "$mc_cert_link")
|
||||||
|
|
||||||
|
[[ -f $target_cert ]] && return 0
|
||||||
|
|
||||||
|
# Have to use command array instead of eval because of whitespace in $mc_cert_link
|
||||||
|
if [[ -f /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ]]; then
|
||||||
|
ln_cmd=("sudo" "ln" "-fs" "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" "$mc_cert_link") # For RHEL
|
||||||
|
elif [[ -f /var/lib/ca-certificates/ca-bundle.pem ]]; then
|
||||||
|
ln_cmd=("sudo" "ln" "-fs" "/var/lib/ca-certificates/ca-bundle.pem" "$mc_cert_link") # For SUSE
|
||||||
|
fi
|
||||||
|
|
||||||
|
debug "${ln_cmd[*]}"
|
||||||
|
if ! "${ln_cmd[@]}"; then
|
||||||
err "Symlinking certificates failed"
|
err "Symlinking certificates failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user