about summary refs log tree commit diff
path: root/local-scripts
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-07-31 11:35:21 -0500
committerStarfall <us@starfall.systems>2021-07-31 11:35:21 -0500
commit0d0c26b589a0fedb4cf336683da4c0272a4391d1 (patch)
tree8eebf94705a1fc646d23f9dcfa41d7430817657a /local-scripts
parent2cd0b58531236e367656853cabb80d666b60ed33 (diff)
Haven't been keeping this updated, our bad
Diffstat (limited to 'local-scripts')
-rw-r--r--local-scripts18
1 files changed, 18 insertions, 0 deletions
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