Add default config and flesh out instructions
authorCaleb Maclennan <caleb@alerque.com>
Thu, 6 May 2021 14:05:02 +0000 (17:05 +0300)
committerCaleb Maclennan <caleb@alerque.com>
Thu, 6 May 2021 14:16:46 +0000 (17:16 +0300)
listmonk.install
listmonk.toml
index 38210b54889905db987d6372f2065b32c02704c1..be3a05e2b3060c054fa118aff573b830d96e72f7 100644 (file)
@@ -1,29 +1,39 @@
 post_install() {
        cat <<- EOF
-               Installed with default password. To generate a new random one:
+               WARNING: Installed with default password!
                
-               \$ cd /tmp
-               \$ listmonk --new-config
-               \$ sudo mv config.toml /etc/listmonk/
+               To setup:
                
-               Setup credentials and a database (substiting your own password!):
+               Setup PostgreSQL with credentials and a database:
                
                \$ sudo -u postgres psql
-               postgres=# CREATE USER listmonk WITH PASSWORD 'TKByjizucIoex3mA';
+               postgres=# CREATE USER listmonk WITH PASSWORD '<your_password>';
                postgres=# CREATE DATABASE listmonk;
                postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
+               postgres=# \\q
                
-               Edit with PostgreSQL database credentials, then to setup database, run:
+               Then edit /etc/listmonk/config.toml with your new database credentials.
+               Also be sure to change the admin password from the defalut.
+               
+               Run manually once to setup the database tables:
                
                \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --install
+               
+               Lastly you can enable the system service:
+               
+               \$ sudo systemctl enable --now listmonk
        EOF
 }
 
 post_upgrade() {
        cat <<- EOF
-               To update database, run
+               To update the Listmonk database format, first backup your data, then run:
                
                \$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --upgrade
+               
+               Then restart the service:
+               
+               \$ sudo systemctl restart listmonk
        EOF
 }
 
index 44ea3a2acef19d466fd6b9021cfca8524c76ee21..9ad6cd994dd49e44f765cf1d883d2b893b290ca0 100644 (file)
@@ -1,22 +1,22 @@
 [app]
-    # Interface and port where the app will run its webserver.
-    address = "0.0.0.0:9000"
+# Interface and port where the app will run its webserver.
+address = "localhost:9000"
 
-    # BasicAuth authentication for the admin dashboard. This will eventually
-    # be replaced with a better multi-user, role-based authentication system.
-    # IMPORTANT: Leave both values empty to disable authentication on admin
-    # only where an external authentication is already setup.
-    admin_username = "listmonk"
-    admin_password = "TKByjizucIoex3mA"
+# BasicAuth authentication for the admin dashboard. This will eventually
+# be replaced with a better multi-user, role-based authentication system.
+# IMPORTANT: Leave both values empty to disable authentication on admin
+# only where an external authentication is already setup.
+admin_username = "listmonk"
+admin_password = "<your_password>"
 
 # Database.
 [db]
-    host = "localhost"
-    port = 5432
-    user = "listmonk"
-    password = "TKByjizucIoex3mA"
-    database = "listmonk"
-    ssl_mode = "disable"
-    max_open = 25
-    max_idle = 25
-    max_lifetime = "300s"
+host = "localhost"
+port = 5432
+user = "listmonk"
+password = "listmonk"
+database = "<your_password>"
+ssl_mode = "disable"
+max_open = 25
+max_idle = 25
+max_lifetime = "300s"