about summary refs log tree commit diff
path: root/local-scripts
diff options
context:
space:
mode:
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