From 0d0c26b589a0fedb4cf336683da4c0272a4391d1 Mon Sep 17 00:00:00 2001 From: Starfall Date: Sat, 31 Jul 2021 11:35:21 -0500 Subject: Haven't been keeping this updated, our bad --- local-scripts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 local-scripts (limited to 'local-scripts') diff --git a/local-scripts b/local-scripts new file mode 100644 index 0000000..5a9959d --- /dev/null +++ b/local-scripts @@ -0,0 +1,18 @@ +# rsync backups down to local drive +rsync -rq plural.cafe:/srv/plural.cafe/backups /cygdrive/d/plural-cafe + +# run psql +cd /srv/plural.cafe && sudo docker exec -it -u postgres pluralcafe_db_1 psql + +# grab top IP's and useragents from the access log, sorted from most to least frequent +sudo cut -d '"' -f 1,6 /var/log/nginx/access.log | \ + cut -d ' ' -f 1,6- | sed "s/\"//" | sort | uniq -c | sort -n -r | \ + sed 's/[ \t]*//' | sed 's/;//g' | egrep '^[0-9]{4,}' | \ + less + +# renew certificates with acme.sh +/srv/plural.cafe/.acme.sh/acme.sh --issue --force --debug 2 \ + -d plural.cafe -d '*.plural.cafe' \ + --cert-home /srv/plural.cafe/.acme.sh/plural.cafe \ + --server letsencrypt --preferred-chain "dst" -k 4096 \ + --dns dns_linode_v4 --dnssleep 90 -- cgit