about summary refs log tree commit diff
path: root/local-scripts
blob: 5a9959dda652658d926477e84322df1847667d2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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