summaryrefslogtreecommitdiff
path: root/ergo/ergo.install
diff options
context:
space:
mode:
Diffstat (limited to 'ergo/ergo.install')
-rw-r--r--ergo/ergo.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/ergo/ergo.install b/ergo/ergo.install
new file mode 100644
index 0000000..26c9ee9
--- /dev/null
+++ b/ergo/ergo.install
@@ -0,0 +1,24 @@
+# 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 is now Ergo, you may want to move the
+ files in /var/lib/oragono to /var/lib/ergo.
+EOF
+ else
+ if [[ ! -e /var/lib/ergo/ircd.db ]]; then
+cat <<-EOF
+ ==> Ergo needs to initialize the database and have
+ certificates made available prior to use.
+
+ cd /var/lib/ergo
+ sudo -u ergo /usr/bin/ergo mkcerts --config /etc/ergo.conf
+ sudo -u ergo /usr/bin/ergo initdb --config /etc/ergo.conf
+EOF
+ fi
+ fi
+}