aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorMohammed Amar-Bensaber <renken@shione.net>2024-08-28 22:11:24 +0200
committerMohammed Amar-Bensaber <renken@shione.net>2024-08-28 22:11:24 +0200
commit1c18557adc194890aaca1300d851cd54a5b88418 (patch)
tree09230c5ade1e24893b515badeed947004722fe18 /debian
parenteac275250a801ab39a0972f515fd37b9d1fc4025 (diff)
downloadshione-1c18557adc194890aaca1300d851cd54a5b88418.tar.gz
shione-1c18557adc194890aaca1300d851cd54a5b88418.zip
nginx: postinst: setup certbot and restart service
Diffstat (limited to 'debian')
-rw-r--r--debian/nginx-config.postinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/nginx-config.postinst b/debian/nginx-config.postinst
new file mode 100644
index 0000000..92449c8
--- /dev/null
+++ b/debian/nginx-config.postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# TODO: Handle "$1".
+
+set -e
+
+#DEBHELPER#
+
+# `certbot` *must* be installed by this package.
+certbot \
+ --nginx \
+ --agree-tos \
+ --redirect \
+ --hsts \
+ --staple-ocsp \
+ --email renken+letsencrypt@shione.net \
+ -d shione.net \
+ -d www.shione.net \
+ -d git.shione.net
+
+# Apply new nginx configuration.
+deb-systemd-invoke restart nginx