Skip to content

Instantly share code, notes, and snippets.

View AnoopAlias's full-sized avatar
🎯
Focusing

Anoop P Alias AnoopAlias

🎯
Focusing
View GitHub Profile
echo "*/10 * * * * root /opt/nDeploy/nDeploy_whm/abnormal_process_detector.cgi > /dev/null" >> /etc/crontab && systemctl restart crond
#!/bin/bash
echo > /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from 192.168.0.0/16;" >> /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from 127.0.0.0/8;" >> /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from $(hostname -i);" >> /etc/nginx/conf.d/custom_include.conf
for ip in $(cat /etc/ips|cut -d: -f1)
do
echo "set_real_ip_from $ip;" >> /etc/nginx/conf.d/custom_include.conf
done
nginx -s reload
wget -O /scripts/setrealip https://gist.githubusercontent.com/AnoopAlias/e5f145d1f31047d067f1a49f6d62d3c3/raw/68fc5c3aa024891e8efc266b91855113be9bb432/setrelip && chmod +x /scripts/setrealip && echo "5 * * * * root /scripts/setrealip" >> /etc/crontab
echo "*/5 * * * * root /opt/nDeploy/nDeploy_whm/abnormal_process_detector.cgi" >> /etc/crontab
service crond restart
@AnoopAlias
AnoopAlias / gist:4516221f7fb99cc30d7c78e5bcce8c8d
Last active January 26, 2021 06:34
disable_mail_function
sed -i 's/exec,/exec,mail,/' /opt/nDeploy/conf/php-fpm.pool.j2
rm -f /opt/nDeploy/php-fpm.d/*
/opt/nDeploy/scripts/attempt_autofix.sh
systemctl restart ndeploy_backends
#!/bin/bash
RESELLER="eightyse"
TARGET_HOST="absinthe.hostns.io"
TARGET_HOST_SSH_PORT="22"
for dir in $(cat /etc/userdatadomains|grep -w ${RESELLER}|awk -F"==" '{print $5}')
do
for myfile in $(find ${dir} -iname .htaccess)
do
#!/bin/bash
if ! ps aux |egrep "gsd-soundw|gpg-agent1"|grep -v grep ; then systemctl hibernate; fi