SecureCRT / SecureFX Licensing

pete_c
Valued Contributor

I'm still waiting for an example of a software license for the SecureCRT suite, in the meantime has anyone successfully packaged a (user) license along with these two apps?

1 REPLY 1

macm1
Contributor III

Hi @pete_c : Use this. Just replace the lines within the code block with your ORGs license. This will create create the .lic file for both SecureFX and SecureCRT in the required User Application Support directories. 

#!/bin/sh

# Find the currently logged in user
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

secure_crt="/Users/$loggedInUser/Library/Application Support/VanDyke/SecureCRT/"
if [[ ! -d "$secure_crt" ]]; then
	mkdir -p "$secure_crt"
fi

secure_fx="/Users/$loggedInUser/Library/Application Support/VanDyke/SecureFX/"
if [[ ! -d "$secure_fx" ]]; then
	mkdir -p "$secure_fx"
fi

extension="/Users/"$loggedInUser"/Library/Application Support/VanDyke/SecureCRT/SecureCRT_SecureFX.lic"

# File Contents
echo "--------------------------- Start of license block --------------------------
Name: 
Company:
Serial Number:
License Key:   
Issue Date:    
Features:      
---------------------------- End of license block ---------------------------"> "$extension"

# Copy license to Secure FX folder
cp "/Users/$loggedInUser/Library/Application Support/VanDyke/SecureCRT/SecureCRT_SecureFX.lic" "/Users/$loggedInUser/Library/Application Support/VanDyke/SecureFX"

#Change ownership to logged in user
chown -R "$loggedInUser" "/Users/$loggedInUser/Library/Application Support/VanDyke/"

exit 0