Installed cPanel Plugin not showing Up
Hi Everyone, I hope you're all doing well.
I have Varnish Cache installed on my server that works with cPanel. So I am trying to create a cPanel Plugin for varnish that'll enable users to flush Varnish cache directly from cPanel. I created a documentation here https://github.com/turnuphosting/cPanel-plugin-to-flush-varnish-cache-for-user-websites/blob/main/plugin%20creation%20instructions.php and followed it to install Varnish cache flush plugin for cPanel. Can you please review and see if I missed something lol, because from the terminal it says the plugin installed ok, but it's not showing in Feature Manager or cPanel.
-
The "install_plugins" script expects a plugin archive or folder containing all the files (like install.json, etc.), but the instructions in that file fails to properly tell you to throw all these files into a the same folder for the "install_plugins" script to read. Perhaps that is the issue?
You can consult our guide on plugin installation versus theirs to double check their work versus what it should look like here:
https://api.docs.cpanel.net/guides/guide-to-cpanel-plugins/#how-to-install-your-plugin
0 -
Hi Andy,
Thank you for the quick response.
When I run the command below, it shows the plugin folder varnish_cache_flusher in there.
ls -l /usr/local/cpanel/base/frontend/jupiter
When I run the command below, it shows the files in the plugin folder.
ls -l /usr/local/cpanel/base/frontend/jupiter/varnish_cache_flusher
cat /usr/local/cpanel/base/frontend/jupiter/varnish_cache_flusher/install.json
{
"id": "varnish_cache_flusher",
"version": "1.0",
"name": "Varnish Cache Flusher",
"description": "A plugin to flush Varnish cache",
"icon": "icon.png",
"featuremanager": {
"vars": {
"group": "Varnish Tools",
"features": [
"flush_varnish_cache"
]
}
},
"entry": {
"url": "flush_varnish.php",
"require": "module=Security",
"displayname": "Flush Varnish Cache"
},
"pluginType": "cjt",
"requiredFeatures": [],
"run": {
"type": "application",
"command": "/usr/local/cpanel/base/frontend/jupiter/varnish_cache_flusher/varnish_cache_flusher.live.php"
}
}
cat /usr/local/cpanel/base/frontend/jupiter/varnish_cache_flusher/plugin_file.json
{
"id": "varnish_cache_flusher",
"entry": "flush_varnish.php",
"name": "Varnish Cache Flusher",
"description": "Flush Varnish cache for user websites.",
"pluginType": "cjt",
"category": {
"id": "cPanel",
"name": "cPanel"
},
"metadata": {
"icon": "icon.png",
"displayname": "Varnish Cache Flusher"
},
"version": "1.0",
"apiVersion": 1,
"requiredFeatures": [],
"run": {
"type": "application",
"command": "/usr/local/cpanel/base/frontend/jupiter/varnish_cache_flusher/varnish_cache_flusher.live.php"
}
}0 -
Going to try out the instructions myself on a virtual machine, see what's going on. Will report back soon
0 -
Sounds good Andy, thank you for your help.
0 -
Sent you a pull request, I saw what the issue was -- the install.json file wasn't specifying the correct parameters.
https://github.com/turnuphosting/cPanel-plugin-to-flush-varnish-cache-for-user-websites/pull/1
In the future, make sure your install.json looks like the examples here:
0 -
Thank you, Andy, I've merged your pull request. Also, I'll take note to follow the correct install.json format. Let me try it out now.
0 -
Hi Andy,Once again, thank you very much, your expertise was needed.I can confirm it’s showing up in both Feature Manager and cPanel.I’m working on converting the vanish cache installation guide for WHM into a shell script and will share both with you for review.The current installation guide is a step-by-step process.
Can I add you to that project on GitHub?I think a lot of WHM users would love that and benefit from both.Kind regards.0 -
If you wish you can add me, I don't mind it. I've got a lot of other things on my plate right now though, so don't be surprised if I don't take a very active role in things.
0 -
Sounds good and yes, I do understand, thank you.
0 -
Andy, I have completed the semi-automation of the installation and configuration of both Varnish cache and Hitch, when you get the chance can you also test by following the readme as seen here https://github.com/turnuphosting/varnish-cache-installation-on-WHM-and-cPanel-for-RHElL-based-Linux-version-8.x/tree/main and let me know if it works on your test server as well.
Thank you.
Kind regards.0
Please sign in to leave a comment.
Comments
10 comments