Skip to content

Commit

Permalink
Updated suse check
Browse files Browse the repository at this point in the history
  • Loading branch information
strick-j committed Apr 14, 2023
1 parent a7b5c38 commit 31b3ee5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Automated CyberArk Privileged Session Manager SSH Proxy Installer.
# User Prompts
Prior to installation have the following information on hand:
1. Accept Eula
2. Folder path that the above required files were copied to. (e.g., /root/PSMP/ or /home/<username>/PSMP)
2. Folder path that the above required files were copied to. (e.g., /root/PSMP/ or /home/PSMP)
3. Vault IP Address
4. Vault Username - Note user requires permissions to perform several activities in the vault, more details can be found in the PAS Installation Guide.
5. Vault User Password
Expand Down
51 changes: 38 additions & 13 deletions src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,29 +491,54 @@ function postinstall_integratedsuse() {
local disable_rcnscd=$(rcnscd stop && chkconfig nscd off)
$disable_rcnscd

# Fix Symbolic Link
if [[ -f /etc/pki/tls/certs ]] ; then
write_log "/etc/pki/tls/certs exists already"
# Fix Symbolic Link issues
write_to_terminal "Fixing symbolic link issues for public cert chain"
if [[ -d /etc/pki/tls/certs ]] ; then
write_log "/etc/pki/tls/certs directory exists already"
# Check for symbolic link
else
write_to_terminal "Creating /etc/pki/tls/certs"
mkdir -p /etc/pki/tls/certs
if [[ -f /etc/pki/tls/certs ]] ; then
write_to_terminal "Directory created"
if [[ -f /etc/pki/tls/certs/ca-bundle.crt ]] ; then
write_log "Symbolic link /etc/pki/tls/certs/ca-bundle.crt already exists"
else
write_error "Failed to create /etc/pki/tls/certs, manually create directory and symbolic link"
fi
# Create symbolic link
if [[ -f /etc/ssl/ca-bundle.pem ]] ; then
ln -s /etc/ssl/ca-bundle.pem /etc/pki/tls/certs/ca-bundle.crt
# TODO: Verify Symbolic link created
if [[ -f /etc/pki/tls/certs/ca-bundle.crt ]] ; then
write_log "Symbolic link /etc/pki/tls/certs/ca-bundle.crt created successfully"
else
write_error "Failed to create /etc/pki/tls/certs/ca-bundle.crt symbolic link, manually create symbolic link"
fi
fi
else
# Directory doesnt exist
write_log "Creating /etc/pki/tls/certs"
mkdir -p /etc/pki/tls/certs
if [[ -d /etc/pki/tls/certs ]] ; then
write_log "/etc/pki/tls/certs directory created"
# Create symbolic link
if [[ -f /etc/ssl/ca-bundle.pem ]] ; then
ln -s /etc/ssl/ca-bundle.pem /etc/pki/tls/certs/ca-bundle.crt
if [[ -f /etc/pki/tls/certs/ca-bundle.crt ]] ; then
write_log "Symbolic link /etc/pki/tls/certs/ca-bundle.crt created successfully"
else
write_error "Failed to create /etc/pki/tls/certs/ca-bundle.crt symbolic link, manually create symbolic link"
fi
else
write_error "Failed to find appropriate ca-bundle.pem to create symbolic link"
fi
# Restart PSMP Servive
if [[ $CYBR_OS = "rhel" ]] && [[ $CYBR_OSVERSION = 8* ]]; then
systemctl restart psmpsrv
else
service psmpsrv restart
fi
else
write_error "Failed to create /etc/pki/tls/certs, manually create directory and symbolic link"
fi
fi

# Restart PSMP Servive
if [[ $CYBR_OS = "rhel" ]] && [[ $CYBR_OSVERSION = 8* ]]; then
systemctl restart psmpsrv
else
service psmpsrv restart
fi
printf "\n"
}
Expand Down

0 comments on commit 31b3ee5

Please sign in to comment.