summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-11 21:32:12 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-11 21:32:12 +0200
commita58ae56e98a8d9fcbe7fc7beaa976a4d164ee99a (patch)
tree0b2eb4aea4d26aa914646d211b8cd2be6442fe15 /bin
parent38a8137b2c3e3d62919cfe105b50c2c361b68554 (diff)
parentaa4bdbfc369db3174d39bacc6b26a593a9ec3376 (diff)
Merge branch 'main' of https://git.kallipso.be/dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/drop_cache8
-rwxr-xr-xbin/serverscripts/cfdnsreq13
2 files changed, 21 insertions, 0 deletions
diff --git a/bin/common/drop_cache b/bin/common/drop_cache
new file mode 100755
index 0000000..4833597
--- /dev/null
+++ b/bin/common/drop_cache
@@ -0,0 +1,8 @@
+#!/bin/sh
+if [ "$(id -u)" -ne 0 ]
+then
+ echo "Please run as root."
+ exit 1
+fi
+echo 3 | tee /proc/sys/vm/drop_caches >/dev/null
+echo "cache cleared."
diff --git a/bin/serverscripts/cfdnsreq b/bin/serverscripts/cfdnsreq
new file mode 100755
index 0000000..a380654
--- /dev/null
+++ b/bin/serverscripts/cfdnsreq
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ $# -eq 0 ]
+then
+ echo "no domain provided."
+ exit 1
+fi
+
+certbot certonly \
+ --dns-cloudflare \
+ --dns-cloudflare-credentials ~/.secrets/cloudflare.ini \
+ -m raymaekers.luca@gmail.com \
+ -d $1