Files
non-aur-packages/listmonk/listmonk.install
2021-11-20 17:18:13 +01:00

41 lines
1.0 KiB
Plaintext

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