Another Fix for cheat
This commit is contained in:
9
install
9
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
|
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() {
|
wo_ufw_setup() {
|
||||||
|
|
||||||
# get custom ssh port
|
# get custom ssh port
|
||||||
@@ -828,6 +834,7 @@ else
|
|||||||
if [ -d /etc/systemd/system/mariadb.service.d ]; then
|
if [ -d /etc/systemd/system/mariadb.service.d ]; then
|
||||||
wo_mariadb_tweak | tee -ai $wo_install_log
|
wo_mariadb_tweak | tee -ai $wo_install_log
|
||||||
fi
|
fi
|
||||||
|
wo_cheat_alias | tee -ai $wo_install_log
|
||||||
wo_domain_suffix | 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_lib_echo "Running post-install steps " | tee -ai $wo_install_log
|
||||||
wo_update_wp_cli | 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_lib_echo "Running post-install steps " | tee -ai $wo_install_log
|
||||||
wo_git_init | tee -ai $wo_install_log
|
wo_git_init | tee -ai $wo_install_log
|
||||||
wo_update_wp_cli | 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_lib_echo "Cleaning-up EE previous install" | tee -ai $wo_install_log
|
||||||
wo_clean_ee | tee -ai $wo_install_log
|
wo_clean_ee | tee -ai $wo_install_log
|
||||||
else
|
else
|
||||||
@@ -915,6 +923,7 @@ else
|
|||||||
wo_install_acme_sh | tee -ai $wo_install_log
|
wo_install_acme_sh | tee -ai $wo_install_log
|
||||||
wo_lib_echo "Running post-install steps " | 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
|
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_domain_suffix | tee -ai $wo_install_log
|
||||||
wo_git_init | tee -ai $wo_install_log
|
wo_git_init | tee -ai $wo_install_log
|
||||||
wo_update_wp_cli | tee -ai $wo_install_log
|
wo_update_wp_cli | tee -ai $wo_install_log
|
||||||
|
|||||||
@@ -1485,11 +1485,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
if any('/usr/local/bin/cht.sh' == x[1]
|
if any('/usr/local/bin/cht.sh' == x[1]
|
||||||
for x in packages):
|
for x in packages):
|
||||||
WOFileUtils.chmod(self, "/usr/local/bin/cht.sh", 0o775)
|
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
|
# phpredisadmin
|
||||||
if any('/var/lib/wo/tmp/pra.tar.gz' == x[1]
|
if any('/var/lib/wo/tmp/pra.tar.gz' == x[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user