Home > Cpanel/WHM > Cpanel license verify (from command line)

Cpanel license verify (from command line)

To know whether a cpanel server is licensed or not, we can run the following commands from the server’s command line interface,

But if we need to know the license status of a remote machine the following steps can be used.

1) Create a script named “~/cpanellicense.sh” with the following contents,

#!/bin/bash
url_in="http://www.cpanel.net/apps/verify/index.cgi"
read -p "IP Address: " ip_address
echo "ip=${ip_address}"|lynx ${url_in} -post_data|sed -n '/Entry/{p;n;N;N;N;p;};/Results/{p;n;N;p;}'

2) Grant execute privilege to the script and execute it.

[root@localhost ~]$ chmod u+x ~/cpanellicense.sh
[root@localhost ~]$
[root@localhost ~]$ ~/cpanellicense.sh
IP Address: 12.23.52.21
Results

Not licensed
[root@localhost ~]$
[root@localhost ~]$ ~/cpanellicense.sh
IP Address: 67.225.232.210
Entry # IP Address Package Partner NOC Activity Detail Product Status
Updates Expiration
1 67.225.232.210 LIQUIDWEB-INTERNAL-VPS [29][cPanel%20Distributor.png]
[30]Liquid Web Inc active on: 2011-04-14 11:33:46, group: Liquidweb*
cPanel/WHM VPS active N/A
[root@localhost ~]$

The IP 12.23.52.21 is not licensed, so it will give the result “Not licensed” and the IP address 67.225.232.210 is licensed so it will print out the licensing details.

Advertisements
Categories: Cpanel/WHM
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: