summarylogtreecommitdiffstats
path: root/listmonk.install
blob: 1caf8c69eef8bf77a726a355b76b3437750d4e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
post_install() {
	cat <<- EOF
		WARNING: Installed with default password!
		
		To setup:
		
		Setup PostgreSQL with credentials and a database:
		
		\$ sudo -u postgres psql
		postgres=# CREATE USER listmonk WITH PASSWORD '<your_password>';
		postgres=# CREATE DATABASE listmonk WITH OWNER listmonk;
		postgres=# \\q
		
		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 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
}

# vim: : ts=4 sw=4 noet