Skip to content

Instantly share code, notes, and snippets.

@sagakom
Created February 18, 2020 17:56
Show Gist options
  • Save sagakom/c2db02933930d8f09f43b3ebb7645444 to your computer and use it in GitHub Desktop.
Save sagakom/c2db02933930d8f09f43b3ebb7645444 to your computer and use it in GitHub Desktop.
Plesk Trial License Update Automation
A00M00-R0MZ05-YMNH13-15YM73-XMQB25
A00M00-R0MZ05-YMNH13-15YM73-XMQB25
A00M00-R0MZ05-YMNH13-15YM73-XMQB25
#!/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/yashodhank/a7ac287504b7f6358a9791bc725da973/raw/${edition} -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/sbin/plesk bin license -i ${key}
#exit 0
#else
#echo "Error Key Id: ${key_id} OR Key Date: ${lim_date} exists!";
#exit 113
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment