diff --git a/install b/install index 84e7f4b..4b0ef22 100755 --- a/install +++ b/install @@ -714,6 +714,12 @@ wo_uninstall() { rm -rf /usr/local/lib/python3.*/dist-packages/{pystache-*,cement-2.*,wo-*} /usr/local/bin/wo /etc/bash_completion.d/wo_auto.rc /var/lib/wo /etc/wo /usr/lib/wo/templates >> /var/log/wo/install.log 2>&1 } +wo_cheat_alias() { + if ! grep -q "cheat" "$HOME/.bashrc"; then + echo "alias cheat='/usr/local/bin/cht.sh'" >> "$HOME/.bashrc" + fi +} + wo_ufw_setup() { # get custom ssh port @@ -828,6 +834,7 @@ else if [ -d /etc/systemd/system/mariadb.service.d ]; then wo_mariadb_tweak | tee -ai $wo_install_log fi + wo_cheat_alias | tee -ai $wo_install_log wo_domain_suffix | tee -ai $wo_install_log wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log wo_update_wp_cli | tee -ai $wo_install_log @@ -881,6 +888,7 @@ else wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log wo_git_init | tee -ai $wo_install_log wo_update_wp_cli | tee -ai $wo_install_log + wo_cheat_alias | tee -ai $wo_install_log wo_lib_echo "Cleaning-up EE previous install" | tee -ai $wo_install_log wo_clean_ee | tee -ai $wo_install_log else @@ -915,6 +923,7 @@ else wo_install_acme_sh | tee -ai $wo_install_log wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log secure_wo_db | tee -ai $wo_install_log + wo_cheat_alias | tee -ai $wo_install_log wo_domain_suffix | tee -ai $wo_install_log wo_git_init | tee -ai $wo_install_log wo_update_wp_cli | tee -ai $wo_install_log diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index a998b07..bf1e816 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1485,11 +1485,6 @@ def post_pref(self, apt_packages, packages, upgrade=False): if any('/usr/local/bin/cht.sh' == x[1] for x in packages): WOFileUtils.chmod(self, "/usr/local/bin/cht.sh", 0o775) - if (not WOFileUtils.grep(self, "/root/.bashrc", "cheat") and - not WOFileUtils.grep(self, "/home/ubuntu/.bashrc", "cheat")): - with open("/root/.bashrc", - "a") as wo_bashrc: - wo_bashrc.write("\nalias cheat='/usr/local/bin/cht.sh'\n") # phpredisadmin if any('/var/lib/wo/tmp/pra.tar.gz' == x[1]