Several new features
- cht.sh stack : linux online cheatsheet. Usage : `cheat <command>`. Example for tar : `cheat tar` - ClamAV anti-virus with weekly cronjob to update signatures database - Internal function to add daily cronjobs - Additional comment to detect previous configuration tuning (MariaDB & Redis) - Domain/Subdomain detection based on public domain suffixes list - Increase Nginx & MariaDB systemd open_files limits - Cronjob to update Cloudflare IPs list
This commit is contained in:
23
wo/cli/templates/cf-update.sh
Normal file
23
wo/cli/templates/cf-update.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# WordOps bash script to update cloudflare IP
|
||||
|
||||
CURL_BIN=$(command -v curl)
|
||||
CF_IPV4=$($CURL_BIN -sL https://www.cloudflare.com/ips-v4)
|
||||
CF_IPV6=$($CURL_BIN -sL https://www.cloudflare.com/ips-v6)
|
||||
|
||||
echo -e '# WordOps (wo) set visitors real ip with Cloudflare\n' > /etc/nginx/conf.d/cloudflare.conf
|
||||
echo "####################################"
|
||||
echo "Adding Cloudflare IPv4"
|
||||
echo "####################################"
|
||||
for cf_ip4 in $CF_IPV4; do
|
||||
echo "set_real_ip_from $cf_ip4;" >> /etc/nginx/conf.d/cloudflare.conf
|
||||
done
|
||||
echo "####################################"
|
||||
echo "Adding Cloudflare IPv6"
|
||||
echo "####################################"
|
||||
for cf_ip6 in $CF_IPV6; do
|
||||
echo "set_real_ip_from $cf_ip6;" >> /etc/nginx/conf.d/cloudflare.conf
|
||||
done
|
||||
echo 'real_ip_header CF-Connecting-IP;' >> /etc/nginx/conf.d/cloudflare.conf
|
||||
|
||||
nginx -t && service nginx reload
|
||||
11
wo/cli/templates/freshclam.mustache
Normal file
11
wo/cli/templates/freshclam.mustache
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# WordOps ClamAV freshclam script
|
||||
# script path after installation /opt/freshcham.sh
|
||||
|
||||
if [ -x /etc/init.d/clamav-freshclam ]; then
|
||||
{
|
||||
/etc/init.d/clamav-freshclam stop
|
||||
freshclam
|
||||
/etc/init.d/clamav-freshclam start
|
||||
} >> /var/log/wo/clamav.log 2>&1
|
||||
fi
|
||||
Reference in New Issue
Block a user