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
|
||||
|
||||
declare -g SCRIPTVERSION="1.0b15"
|
||||
declare -g SCRIPTVERSION="1.0b16"
|
||||
declare -g OUTPUTDIR="$PWD/output"
|
||||
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
||||
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() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
if [[ ! -f /etc/ssl/certs/ca-certificates.crt &&
|
||||
-f /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ]]; then
|
||||
debug "ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt"
|
||||
if ! sudo ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
|
||||
/etc/ssl/certs/ca-certificates.crt; then
|
||||
declare mc_cert_link="/usr/lib/jriver/Media Center $MVERSION/ca-certificates.crt"
|
||||
declare target_cert
|
||||
declare -a ln_cmd
|
||||
|
||||
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"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user