From 52de3a6b8417a7e016530d418ec26ce23f354b98 Mon Sep 17 00:00:00 2001 From: MagenX Date: Fri, 26 May 2023 12:32:08 +0200 Subject: [PATCH 1/3] service usernames update magento_indexer_ magento_rabbitmq_ --- magenx.install.latest.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/magenx.install.latest.sh b/magenx.install.latest.sh index 5fc1f5a..533949e 100644 --- a/magenx.install.latest.sh +++ b/magenx.install.latest.sh @@ -853,7 +853,7 @@ for MAGENTO_ENV_SELECTED in "${MAGENTO_ENV[@]}" for SERVICE in session cache do -cat > /etc/redis/redis-${SERVICE}-${MAGENTO_ENV_SELECTED}.conf< /etc/redis/redis_${SERVICE}_${MAGENTO_ENV_SELECTED}.conf<> /etc/hosts @@ -1006,8 +1006,8 @@ for MAGENTO_ENV_SELECTED in "${MAGENTO_ENV[@]}" do MAGENTO_RABBITMQ_PASSWORD="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n 1)" ${SQLITE3} "UPDATE magento SET magento_rabbitmq_password = '${MAGENTO_RABBITMQ_PASSWORD}' WHERE magento_env = '${MAGENTO_ENV_SELECTED}';" - rabbitmqctl add_user ${MAGENTO_ENV_SELECTED} ${MAGENTO_RABBITMQ_PASSWORD} - rabbitmqctl set_permissions -p / ${MAGENTO_ENV_SELECTED} ".*" ".*" ".*" + rabbitmqctl add_user magento_rabbitmq_${MAGENTO_ENV_SELECTED} ${MAGENTO_RABBITMQ_PASSWORD} + rabbitmqctl set_permissions -p / magento_rabbitmq_${MAGENTO_ENV_SELECTED} ".*" ".*" ".*" done else echo "" @@ -1142,7 +1142,7 @@ for MAGENTO_ENV_SELECTED in "${MAGENTO_ENV[@]}" ${SQLITE3} "UPDATE magento SET magento_indexer_password = '${MAGENTO_INDEXER_PASSWORD}' WHERE magento_env = '${MAGENTO_ENV_SELECTED}';" echo "" # create and check if role already created -ROLE_CREATED=$(curl -X POST -u elastic:${ELASTICSEARCH_PASSWORD} "http://127.0.0.1:9200/_security/role/magento_${MAGENTO_ENV_SELECTED}_indexer" \ +ROLE_CREATED=$(curl -X POST -u elastic:${ELASTICSEARCH_PASSWORD} "http://127.0.0.1:9200/_security/role/magento_indexer_${MAGENTO_ENV_SELECTED}" \ -H 'Content-Type: application/json' -sS \ -d @<(cat < Date: Fri, 26 May 2023 19:39:58 +0200 Subject: [PATCH 2/3] run csf process ignore script in 4 hours --- magenx.install.latest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magenx.install.latest.sh b/magenx.install.latest.sh index 533949e..d9fa20c 100644 --- a/magenx.install.latest.sh +++ b/magenx.install.latest.sh @@ -2237,10 +2237,11 @@ END csf -ra curl -o /etc/csf/csf_pignore.sh ${MAGENX_INSTALL_GITHUB_REPO}/csf_pignore.sh +chmod +x /etc/csf/csf_pignore.sh crontab -l > /tmp/csf_crontab cat << END | tee -a /tmp/csf_crontab -0 0 * * 0 /etc/csf/csf_pignore.sh && crontab -l | grep -v "csf_pignore.sh" | crontab - +0 */4 * * * /etc/csf/csf_pignore.sh && crontab -l | grep -v "csf_pignore.sh" | crontab - END crontab /tmp/csf_crontab rm /tmp/csf_crontab From 9d7042b64a76e8ca481c671b005be331c027a10c Mon Sep 17 00:00:00 2001 From: MagenX Date: Mon, 29 May 2023 09:24:26 +0200 Subject: [PATCH 3/3] add nfs-common --- magenx.install.latest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magenx.install.latest.sh b/magenx.install.latest.sh index d9fa20c..9a95988 100644 --- a/magenx.install.latest.sh +++ b/magenx.install.latest.sh @@ -49,7 +49,7 @@ MALDET="https://www.rfxn.com/downloads/maldetect-current.tar.gz" WEB_STACK_CHECK="mysql* rabbitmq* elasticsearch percona-server* maria* php* nginx* ufw varnish* certbot* redis* webmin" EXTRA_PACKAGES="curl jq gnupg2 auditd apt-transport-https apt-show-versions ca-certificates lsb-release make autoconf snapd automake libtool uuid-runtime \ -perl openssl unzip screen inotify-tools iptables smartmontools mlocate vim wget sudo apache2-utils \ +perl openssl unzip screen nfs-common inotify-tools iptables smartmontools mlocate vim wget sudo apache2-utils \ logrotate git netcat patch ipset postfix strace rsyslog geoipupdate moreutils lsof sysstat acl attr iotop expect imagemagick snmp" PERL_MODULES="liblwp-protocol-https-perl libdbi-perl libconfig-inifiles-perl libdbd-mysql-perl libterm-readkey-perl"