How to automatically disable and enable a plugin in confluence

Hi,

We want to restart (disable/enable) a user installed plugin in confluence every midnight. I was hoping to curl an API for the same but looks like the APIs only support content modification and not any changes related to plugin. Is there any other way to write maybe a job to restart a plugin in confluence?

Any advice would be highly appreciated.

 

Best Regards,

Bhupesh

1 answer

0 vote
Ann Worley Atlassian Team Sep 18, 2017

I wasn't able to find an API for disabling a plugin in Confluence, either. The Bob Swift CLI tool seems to provide the ability to check status of an add-on, but I didn't see anything about disabling add-ons in their docs.

If you are good with shell scripting you can disable the plugin using SQL in a shell script. The SQL is on this page: How to manually remove malfunctioning add-ons The issue with this approach is Confluence would need to be restarted to pick up the change in the database.

I am curious about your use case. Please let me know more about what add-on it is, and why it needs to be disabled at midnight.

Hi,

Thank you for reply!

We have a heavy weight plugin developed by a vendor for us. It controls the complete UI of our confluence and uses it's own mechanism for creating new content in confluence spaces.

There is a lot of custom functionality developed in this plugin which is not possible in confluence out of box.  So the issue is that using script runner in jira we are creating a page in confluence passing url parametrs required to create page in confluence like page title, issue key etc. We also create a link from jira to confluence but when the user clicks on link to access the page, it get page not found error. Then we have to disable and enable the plugin to get the link working. So it is some plugin cache issue. 

 

Thanks & Regards,

Bhupesh

That's something that would need to go to the vendor of this add-on you have.

If your SR script is creating a page using the standard REST function, then the page should be immediately visible without having to do anything.  It sounds like the add-on is breaking something in the indexing, maybe by replacing part of the normal create process with its own.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,260 views 25 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you