summarylogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJason Papakostas2020-06-08 17:41:36 +0200
committerJason Papakostas2020-06-09 13:56:22 +0200
commitb8ed075466084575945ab6c004624ef866a8fa01 (patch)
treee0159eb5e222db9811b157d018fc57b93f59633f /install
parent82a4cf650cb5158fe4f74b29cc729f9ff19f37cd (diff)
downloadaur-b8ed075466084575945ab6c004624ef866a8fa01.tar.gz
upstream v2.1.0 released
- recreated config patch - default cert filenames changed
Diffstat (limited to 'install')
-rw-r--r--install36
1 files changed, 30 insertions, 6 deletions
diff --git a/install b/install
index b2fc3992124d..de78ad3882b8 100644
--- a/install
+++ b/install
@@ -1,12 +1,36 @@
+# Warning: This file has syntactically significant, mixed whitespace.
+# The heredoc bodies are indented with tabs up to the block level.
+# The tabs are for block indentation in the source code.
+# The spaces following the tabs are for indentation of the printed output.
+
post_install() {
if [[ ! -e /var/lib/oragono/ircd.db ]]; then
- cat <<-EOF
- ==> oragono needs to initialize the database and have
- certificates made available prior to use.
+ cat <<-EOF
+ ==> oragono needs to initialize the database and have
+ certificates made available prior to use.
+ EOF
+ mkcert_howto
+ fi
+}
- cd /var/lib/oragono
- sudo -u oragono /usr/bin/oragono mkcerts --conf /etc/oragono.conf
- sudo -u oragono /usr/bin/oragono initdb --conf /etc/oragono.conf
+post_upgrade() {
+ if (( "$(vercmp "$2" 2.1.0)" < 0 )); then
+ cat <<-EOF
+ ==> The tls certificate filenames in the default config have changed.
+ In /var/lib/oragono/:
+ tls.crt -> fullchain.pem
+ tls.key -> privkey.pem
+
+ To generate new self-signed certificates:
EOF
+ mkcert_howto
fi
}
+
+mkcert_howto() {
+ cat <<-EOF
+ cd /var/lib/oragono
+ sudo -u oragono /usr/bin/oragono mkcerts --conf /etc/oragono.conf
+ sudo -u oragono /usr/bin/oragono initdb --conf /etc/oragono.conf
+ EOF
+}