summarylogtreecommitdiffstats
path: root/listmonk.install
blob: be3a05e2b3060c054fa118aff573b830d96e72f7 (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
40
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;
		postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO 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