From 8ad070306bbaba22cf32b09161ffb413021a1943 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 25 Mar 2019 10:05:20 +0100 Subject: [PATCH] fix maintenance --- config/bash_completion.d/wo_auto.rc | 2 +- config/plugins.d/maintenance.conf | 8 ++++++ install | 4 +-- wo/cli/plugins/maintenance.py | 2 -- .../templates/15-content_filter_mode.mustache | 27 ------------------- 5 files changed, 11 insertions(+), 32 deletions(-) create mode 100644 config/plugins.d/maintenance.conf delete mode 100644 wo/cli/templates/15-content_filter_mode.mustache diff --git a/config/bash_completion.d/wo_auto.rc b/config/bash_completion.d/wo_auto.rc index f08fced..8ff11e5 100644 --- a/config/bash_completion.d/wo_auto.rc +++ b/config/bash_completion.d/wo_auto.rc @@ -11,7 +11,7 @@ _wo_complete() # SETUP THE BASE LEVEL (everything after "wo") if [ $COMP_CWORD -eq 1 ]; then COMPREPLY=( $(compgen \ - -W "stack site debug clean secure import-slow-log log update sync info --version --help --quiet" \ + -W "stack site debug clean secure import-slow-log log update sync info maintenance --version --help --quiet" \ -- $cur) ) diff --git a/config/plugins.d/maintenance.conf b/config/plugins.d/maintenance.conf new file mode 100644 index 0000000..07ac10a --- /dev/null +++ b/config/plugins.d/maintenance.conf @@ -0,0 +1,8 @@ +### Example Plugin Configuration for WordOps + +[maintenance] + +### If enabled, load a plugin named `example` either from the Python module +### `wo.cli.plugins.example` or from the file path +### `/var/lib/wo/plugins/example.py` +enable_plugin = true diff --git a/install b/install index bb51edd..9f2b424 100644 --- a/install +++ b/install @@ -679,7 +679,7 @@ if [ "$migration" -eq "1" ]; then wo_lib_echo_info "For autocompletion, run the following command:" wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc" echo - wo_lib_echo "WordOps (wo) help: https://wordops.io/docs" + wo_lib_echo "WordOps (wo) help: https://docs.wordops.io" else echo wo_lib_echo "For WordOps (wo) auto completion, run the following command" @@ -687,5 +687,5 @@ else wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc" echo wo_lib_echo "Yay! WordOps (wo) installed/updated successfully" - wo_lib_echo "WordOps (wo) help: https://wordops.io/docs" + wo_lib_echo "WordOps (wo) help: https://docs.wordops.io" fi diff --git a/wo/cli/plugins/maintenance.py b/wo/cli/plugins/maintenance.py index 07c9a51..67d7cad 100644 --- a/wo/cli/plugins/maintenance.py +++ b/wo/cli/plugins/maintenance.py @@ -11,8 +11,6 @@ from wo.core.fileutils import WOFileUtils from wo.core.shellexec import WOShellExec from wo.core.git import WOGit from wo.core.download import WODownload -import configparser -import os def wo_maintenance_hook(app): diff --git a/wo/cli/templates/15-content_filter_mode.mustache b/wo/cli/templates/15-content_filter_mode.mustache deleted file mode 100644 index 6fd8f21..0000000 --- a/wo/cli/templates/15-content_filter_mode.mustache +++ /dev/null @@ -1,27 +0,0 @@ -use strict; - -# You can modify this file to re-enable SPAM checking through spamassassin -# and to re-enable antivirus checking. - -# -# Default antivirus checking mode -# Please note, that anti-virus checking is DISABLED by -# default. -# If You wish to enable it, please uncomment the following lines: - - -@bypass_virus_checks_maps = ( - \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re); - - -# -# Default SPAM checking mode -# Please note, that anti-spam checking is DISABLED by -# default. -# If You wish to enable it, please uncomment the following lines: - - -@bypass_spam_checks_maps = ( - \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re); - -1; # ensure a defined return