Skip to content

Commit

Permalink
simplify SFS update script
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Dec 19, 2023
1 parent e51aef6 commit ad54c93
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions stopforumspam-update
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

set -o errexit -o nounset -o pipefail

curl --fail-with-body https://www.stopforumspam.com/downloads/toxic_ip_cidr.txt | awk '{ print $1 " 1;" }' > /etc/nginx/stopforumspam-toxic_ip_cidr.conf.new
mv /etc/nginx/stopforumspam-toxic_ip_cidr.conf.new /etc/nginx/stopforumspam-toxic_ip_cidr.conf
curl --fail-with-body https://www.stopforumspam.com/downloads/listed_ip_30_ipv46.zip | gunzip | awk '{ print $1 " 1;" }' > /etc/nginx/stopforumspam-listed_ip_30_ipv46.conf.new
mv /etc/nginx/stopforumspam-listed_ip_30_ipv46.conf.new /etc/nginx/stopforumspam-listed_ip_30_ipv46.conf
cd /etc/nginx
curl --fail-with-body https://www.stopforumspam.com/downloads/toxic_ip_cidr.txt | awk '{ print $1 " 1;" }' > stopforumspam-toxic_ip_cidr.conf.new
mv stopforumspam-toxic_ip_cidr.conf.new stopforumspam-toxic_ip_cidr.conf
curl --fail-with-body https://www.stopforumspam.com/downloads/listed_ip_30_ipv46.zip | gunzip | awk '{ print $1 " 1;" }' > stopforumspam-listed_ip_30_ipv46.conf.new
mv stopforumspam-listed_ip_30_ipv46.conf.new stopforumspam-listed_ip_30_ipv46.conf
nginx -s reload

0 comments on commit ad54c93

Please sign in to comment.