Skip to content

Instantly share code, notes, and snippets.

@webalphatv
Last active August 21, 2022 12:46
Show Gist options
  • Save webalphatv/fac0a4cf428e12a800fa138a1d9ceb82 to your computer and use it in GitHub Desktop.
Save webalphatv/fac0a4cf428e12a800fa138a1d9ceb82 to your computer and use it in GitHub Desktop.
Plesk Trial License Update Automation
A00C00-N4FS09-V4PM76-0F1A33-J71A00
#!/bin/bash
# Set edition type for activation as host / pro / admin
edition=pro
#
# *************** do not change below this line ***************
#
key=$(/usr/bin/wget https://gist.githubusercontent.com/webalphatv/fac0a4cf428e12a800fa138a1d9ceb82/raw/trial -q -O -)
key_id=$(/usr/sbin/plesk bin keyinfo --list | grep plesk_key_id | grep -Eo '[[:alpha:]]{4}[[:digit:]]{12}')
lim_date=$(/usr/sbin/plesk bin keyinfo --list | grep lim_date | grep -Eo '[[:digit:]]{8}')
# plesk_key_id: plsk000000000000 | lim_date: -1
#if [ "${key_id}" = "plsk000000000000" ] || [ $lim_date -eq -1 ]
#then
/bin/rm -rf /etc/sw/keys/keys/key*
/usr/local/psa/bin/license -i ${key}
#exit 0
#else
echo "Error Key Id: ${key_id} OR Key Date: ${lim_date} exists!";
echo 'Licensing System Trial By Web Alpha Host';
#exit 113
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment