Are there any automated scripts to disable system plugins in confluence?
Asked by Ramana:

As part of our organizations requirements.We have manually disable few of the System modules

Navigate to Confluence administrators menu  
Navigate to "Manage Add-on" menu  
Choose "System Plugins" from the drop downlist  
Find and click "Confluence Content Notification" plugin  
Click the "\<Number\> of \<Number\> Modules enabled" button  
From there, find and disable the following modules  
page-created-notification  
page-edited-notification  
page-moved-notification  
page-trashed-notification  
To disable comment deletion e-mails, find and click "Confluence Email Notifications Plugin" plugin  
Click the "\<Number\> of \<Number\> Modules enabled" button  
From there, find and disable the following module  
notification-templates-comment-remove-1.0.0

After we restart the modules are reverting back to the old values and creating problem for us to enable every time we restart.Do we have any script that can be run after the restart.


Answers:
author: Ramana
body: [@Stephen Sifers](/t5/user/viewprofilepage/user-id/2145523) Did you get a chance to look into the updates provided by us.


author: Geeth
body: Hello Stephen,

Let me explain the scenario as we were in need of just disabling only a particular module from one system level plugin ..Details as below

Plugin: Confluence Email Notifications  
Plugin module: notification-templates-comment-remove-1.0.0

But when we had a restart of the app server ,we faced like

notification-templates-comment-remove-1.0.0 modules was enabled even after the restart..

So the case here could be like this plugin possible has dependency from other plugins..(Still not updated with RCA)..

So our requirement is to know whether ,is there any automated script for plugin and its module with in server level and also the script should be capable of disabling only the modules with in the plugin and not the entire plugin set ...If so please could you help us with the script..

And if not ,any other solution apart from manual do for the same ?


author: Ramana
body: **Thanks sifers for you response.**

**The version of Confluence server you're running.**

Confluence 6.10.0.

**Any other add-ons you may have in your instance.**

Gliffy Diagrams for Confluence, Questions for Confluence Plugin, Table Filter and Charts for Confluence \&Team Calendars.

**Are you running Confluence as a service or manually via a script?**

Confluence as a service.

comments: author: Ramana
body: [@Stephen Sifers](/t5/user/viewprofilepage/user-id/2145523) Did you get a chance to look into the updates provided by us.


author: Stephen Sifers
body: Hello Ramana,

Thanks for reaching out to Community to find out about easier ways to disable system plugins. From your description, it looks as though you're following the steps within this guide; [How to globally disable e-mail notifications with page content](https://confluence.atlassian.com/confkb/how-to-globally-disable-e-mail-notifications-with-page-content-718670714.html). If this is the case and your plugins are starting again once disabled then we'll need to investigate further as this should not be the case. So we may attempt to recreate your issue, could you please let us know the following:

* The version of Confluence server you're running.
* Any other add-ons you may have in your instance.
* Are you running Confluence as a service or manually via a script?

We look forward to hearing back to help find the cause of your services re-enabling themselves.

Regards,  
Stephen Sifers

comments: author: Stephen Sifers
body: Hello Ramana,

I set up Confluence with the same version you reported and plugins as well, stopped and started the instance a few times and was unable to recreate your issue of the plug-ins re-enabling. I confirmed after every service restart the notifications stayed disabled.

Something else we can try is to clear your plug-in cache which may be causing the re-enabling issue. To clear your Confluence server plug-in cache, please follow these steps:
> Solution
>
> 1. Shutdown Confluence
> 2. Ensure the user running Confluence has full read/write privileges to the confluence-home directory.
> 3. Remove the following directories!!! This will remove the plugin cache files only and will not permanently remove any plugins. These directories will be recreated during the next Confluence startup. However, some third-party plugins may store metadata in these directories, so we recommend creating a temporary backup of the directories.
>    1. \<confluence-home\>/bundled-plugins
>    2. \<confluence-home\>/plugins-cache
>    3. \<confluence-home\>/plugins-osgi-cache
>    4. \<confluence-home\>/plugins-temp
>    5. \<confluence-home\>/bundled-plugins_language
> 4. Start Confluence

Source documentation: [How to clear Confluence plugins cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html)

We look forward to hearing back to see if this assists with keeping your plugins disabled.

Regards,  
Stephen Sifers


author: Stephen Sifers
body: Hello Ramana,

Please let us know if you've attempted the above steps to clear the plugin cache. Additionally, if this doesn't help resolve the matter, please test Confluence in safe mode to see if the system plugins stay disabled. Further information on safe mode may be found at [Start and Stop Confluence \| With add-ons disabled (for troubleshooting)...](https://confluence.atlassian.com/doc/start-and-stop-confluence-838416264.html)

We look forward to hearing the results to see what might be causing this.

Regards,  
Stephen Sifers


Tags: atl-adm

confluence-server