OpenVZ visualization environments have a a common problem with keeping the correct hostname on reboot, this will thus cause your cPanel license to fail and requires your hostname to be updated every reboot.

I have a simple solution:

A bash script to run on startup as a Service.

Sample Bash Script: cpanel-licence-update

#update cpanel licence after reboot
#systemctl enable licence.service
cd ..

mail -s "Hostname Update" "" <<EOF
The hostname has been updated after a server reboot to: $hostname
This confirms cPanel Licence update.
exit 0

This script will then send a mail to confirm the update has completed.

Sample of Service File:  licence.service

Description=Update cPanel Licence




Putting it all together:

path to update #bash script               /root/cpanel-licence-update
path to #systemd service              /etc/systemd/system/licence.service

systemctl enable licence.service    # Enabling Service

systemctl daemon-reload                #reload systemctl

service licence status -l                    #check service status


You should successfully be able to reboot your CentOS 7 VM  without needed to manually reactivate cPanel licence.

Leave a Reply

Your email address will not be published. Required fields are marked *