This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! ps aux |egrep "gsd-soundw|gpg-agent1"|grep -v grep ; then systemctl hibernate; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "*/5 * * * * root /opt/nDeploy/nDeploy_whm/abnormal_process_detector.cgi" >> /etc/crontab | |
service crond restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O /scripts/setrealip https://gist.githubusercontent.com/AnoopAlias/e5f145d1f31047d067f1a49f6d62d3c3/raw/68fc5c3aa024891e8efc266b91855113be9bb432/setrelip && chmod +x /scripts/setrealip && echo "5 * * * * root /scripts/setrealip" >> /etc/crontab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "*/10 * * * * root /opt/nDeploy/nDeploy_whm/abnormal_process_detector.cgi > /dev/null" >> /etc/crontab && systemctl restart crond |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum -y --enablerepo=ndeploy upgrade | |
/opt/nDeploy/scripts/attempt_autofix.sh | |
systemctl restart nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -m shell -a "yum -y --enablerepo=ndeploy upgrade" | |
yum -y --enablerepo=ndeploy upgrade | |
/opt/nDeploy/scripts/attempt_autofix.sh | |
systemctl restart nginx | |
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -m shell -a "systemctl restart nginx" | |
cd /opt/nDeploy/conf/nDeploy-cluster/ | |
ansible-playbook -i ./hosts cluster.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do on master | |
yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring | |
rm -f /opt/nDeploy/conf/XTENDWEB_MAXSCALE_SETUP_LOCK_DO_NOT_REMOVE | |
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring" | |
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "rm -f /opt/nDeploy/conf/XTENDWEB_MAXSCALE_SETUP_LOCK_DO_NOT_REMOVE" | |
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts /opt/nDeploy/conf/nDeploy-cluster/hosts.orig | |
/opt/nDeploy/scripts/ini2yaml < /opt/nDeploy/conf/nDeploy-cluster/hosts > /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml | |
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml /opt/nDeploy/conf/nDeploy-cluster/hosts |
NewerOlder